REMOTE_FORWARD_PORT
: The port number shared by Quickwork to tunnel the trafficSERVICE_HOSTNAME_OR_IP
: Service hostname or IP SERVICE_PORT
: Port number your service is listening on SSH_USER
: Dedicated username configured by Quickwork for client connection establishment SSH_HOST
: Hostname shared to you by Quickwork, specific to your region PATH_TO_PRIVATE_KEY
: Path to the private key file shared by Quickwork to establish a connection with the remote server-f
: Run SSH agent in the background-N
: Do not allow to execute a remote command-R
: Remote address binding -g
: Allows remote hosts to connect to local forwarded ports -i
: Path to the private key file for identification purposes -o
: Option flags are used to exit on failure and keep the connection aliveHost <SSH_HOST>
user <SSH_USER>
IdentityFile <PATH_TO_PRIVATE_KEY>
ServerAliveInterval 30
ServerAliveCountMax 1
ExitOnForwardFailure yes
autossh
, in case you want to use a reliable SSH process manager:
ssh -f -N -R
<REMOTE_FORWARD_PORT>:<SERVICE_HOSTNAME_OR_IP>:<SERVICE_PORT> <SSH_HOST> -g
or via autossh
autossh -M 0 -f -N -R
<REMOTE_FORWARD_PORT>:<SERVICE_HOSTNAME_OR_IP>:<SERVICE_PORT> <SSH_HOST> -g
Note: Ensure that the service running the SSH client can access the underlying service.SSH_HOST
: Hostname shared to you by Quickwork, specific to your regionREMOTE_FORWARD_PORT
: The port number shared by Quickwork to tunnel the traffic DB_NAME
: Name of your database DB_USERNAME
: Database username DB_PASSWORD
: Database password