assh icon indicating copy to clipboard operation
assh copied to clipboard

Prefix the ssh command to run within Docker

Open IngwiePhoenix opened this issue 1 year ago • 0 comments

Hello!

Basically, I would like to know if it would be possible to add to the configuration an option that would prefix the SSH command with a docker command so that I could use something like Gluetun or alike that bootstraps a VPN and thus has access to a remote network? For example:

# I use...
assh customerprefix-servername
# and it becomes...
docker run -it -v /root/.ssh:$HOME/.ssh -v /root/openvpn:$HOME/openvpn/{{customer}} someImage "wait-for-ready && ssh {{servername}}"

The wait-for-ready is just a placeholder for a command to wait until the container is healthy (as in, connected) before running the command.

Would that be possible?

Thank you!

IngwiePhoenix avatar Apr 01 '25 08:04 IngwiePhoenix