ssh/

Forward remote port to a local one via SSH tunnel

ssh -L <LOCAL_PORT>:127.0.0.1:<REMOTE_PORT> remote_server

TCP connections to <LOCAL_PORT> will be forwarded to 127.0.0.1:<REMOTE_PORT> on remote host remote_server

| 25 May 2021

Remove host entry from known_hosts file

To remove a host entry from ~/.ssh/known_hosts you can do it manually by editing the file or use ssh-keygen application:

ssh-keygen -R 135.181.157.20

This should fix Host key verification failed error

| 4 Mar 2021

Keep running ssh command after disconnecting from the server

nohup database_migration.sh &
  • nohup will take care of running the command and forward command output to nohup.out
  • & will run the command in the background

Use tail -f nohup.out to get the output from the command

| 12 Feb 2021