Skip to main content

Bastion Server | ssh cli

Hoop could act as a bastion server and connect into ssh hosts to allow execution of one-off tasks or opening interactive sessions.

Connection Configuration

SSH_PRIVATE_KEYfilesystemThe SSH key to connect into servers
SSH_URIenv-varThe URI to connect to the server, e.g.: ssh://[user@]hostname[:port]

Connection Command


How to Use

Start an interactive session with ssh remote server

# bash interactive session
hoop connect node01
# python3 interactive session
hoop connect node01 -- -t python3

In the same connection, one-off process can be run as well

hoop exec node01 -- python3 <<EOF
import os

hoop exec node01 -i 'import os; print(os.environ)' -- python3
hoop exec node01 -- 'uname -a'