Prerequisites

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

Features

The table below outlines the features available for this type of connection.

  • Native - This refers to when a database client connects through a specific protocol, such as an IDE or client libraries through hoop connect <connection-name>.
  • One Off - This term refers to accessing this connection from Hoop Web App.
FeatureNativeOne OffDescription
AuditThe gateway store and audit the commands being issued by the SSH client.
Data Masking (Google DLP)A policy can be enabled to mask sensitive fields dynamically for the output.
Data Masking (MS Presidio)A policy can be enabled to mask sensitive fields dynamically for the output.
Credentials OffloadThe user authenticates via SSO instead of using SSH credentials.

Configuration

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 \
    -e AUTHORIZED_SERVER_KEYS=file:///path/to/your/private/key

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.