Skip to content

prhost/docker-ssh-exec-command

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSH EXEC COMMAND

Run commands remotely via ssh.

Docker Hub

docker pull prhost/ssh-exec-command

SSHEXEC_HOST = host server (required)

SSHEXEC_PRIVATE_KEY = private sshkey access (required)

SSHEXEC_USERNAME username (default user root)

SSHEXEC_PORT = (default port 22)

SSHEXEC_SCRIPT = shell command to be executed (required)

docker run --rm \
	-e SSHEXEC_HOST=example.com \
	-e SSHEXEC_PRIVATE_KEY="$(< ~/.ssh/id_rsa.key)" \
	-e SSHEXEC_USERNAME=username \
	-e SSHEXEC_PORT=22 \
	-e SSHEXEC_SCRIPT="ls -la" \
prhost/ssh-exec-command

About

Run ssh via command

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages