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
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
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
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 backgroundUse tail -f nohup.out
to get the output from the command