Prerequisites

To get the most out of this guide, you will need to:

NameTypeRequiredDescription
HOSTenv-varyesThe IP or hostname of the SSH server
PORTenv-varnoThe port of the SSH server, default to 22
USERenv-varyesThe username of the Linux server
PASSenv-varnoThe credentials of the username if password authentication is enabled in the SSH server.
AUTHORIZED_SERVER_KEYSenv-varnoThe private key of the user that corresponds to the public key at $HOME/<user>/.ssh/authorized_keys

Connection setup

# ssh server must enable password based authentication
hoop admin create conn myremote-server -a <agent> --overwrite \
    --type application/ssh \
    -e HOST=10.20.30.40 \
    -e USER=root \
    -e PASS=myrootpasswd

# ssh server must enable public key authentication
hoop admin create conn myremote-server -a <agent> --overwrite \
    --type application/ssh \
    -e HOST=10.20.30.40 \
    -e USER=root \
    b64-envvar:AUTHORIZED_SERVER_KEYS="$(cat /path/to/your/private/key |base64)"

In upcoming releases, we plan to automate the management of users, keys, and passwords on the remote server. Additionally, our roadmap includes adding a UI for managing such type of connections.

How to Use it

hoop connect myremote-server --port 2222

Connect with your local SSH client

ssh -p 2222 localhost

SSH Hosts Key

To prevent fingerprint issues when connecting with the local SSH client server, add the client host key during gateway setup. For more details, refer to the environment variables documentation.