JeFaBePh

Familienseite

 
 

Setup a persistant SSH tunnel w/ pre-shared key authentication

Qelle: http://www.commandlinefu.com/commands/view/4458/setup-a-persistant-ssh-tunnel-w-pre-shared-key-authentication

$ autossh -f -i /path/to/key -ND local-IP:PORT User@Server

This creates a persistent ssh -i /path/to/key -ND local-IP:PORT User@Server connection. You may have to install autossh. -f puts in daemon mode. if you are having trouble, try it without -f.