This post lists down some SSH examples you may encounter when developing application

Local port forwarding

ssh -o ServerAliveInterval=50 -NfL LOCAL_PORT:REMOTE_HOST:REMOTE_PORT [email protected]_HOST

ServerAliveInterval number of seconds that the ssh client will wait before sending a message to request a response from server to keep the connection alive, value 0 means disabled (default)

-L LOCAL_PORT:REMOTE_HOST:REMOTE_PORT local port forwarding to remote host and port

-f for running in the background

-N do not execute a remote command

Generate a new SSH Key

ssh-keygen -C [email protected]