I developed a tool to execute BASH scripts on a server in a WebUI. This is what the tool looks like:
BashPanel uses SSH to execute commands on your docker host. You can deploy scripts and execute them directly from the WebUI. The SSH keys are mounted read-only.
Installation:
Setup SSH keys for the server:
# ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519_bashpanel -N ""
# cat ~/.ssh/id_ed25519_bashpanel.pub >> ~/.ssh/authorized_keys
# eval "$(ssh-agent -s)"
# ssh-add ~/.ssh/id_ed25519_bashpanel
The container must be permitted to read the keys. This usually works with these commands: You need to replace "USER" with your username.
$ chmod 700 /home/USER/.ssh
$ chmod 600 /home/USER/.ssh/id_ed25519_bashpanel
$ chmod 644 /home/USER/.ssh/id_ed25519_bashpanel.pub
docker-compose.yml
services:
bashpanel:
image: byte21516/bashpanel:latest
container_name: bashpanel
restart: unless-stopped
network_mode: host
volumes:
- ./bashpanel-scripts:/app/scripts # WebUI Upload/Download
- /home/USER/.ssh/id_ed25519_bashpanel:/root/.ssh/id_ed25519:ro # SSH key (private)
- /home/USER/.ssh/id_ed25519_bashpanel.pub:/root/.ssh/id_ed25519.pub:ro # SSH public key
environment:
- PORT=3001
- HOST_USER=USER
- SSH_KEY_PATH=/root/.ssh/id_ed25519
You can find the image on DockerHub.
You can find a mirror of the source code on GitHub.