linux - how do you translate this ssh command into a ssh_config file? -


i trying translate ssh command ssh_config. equivalant of -l in ssh_config? thought localforward restuls getting not way.

ssh command

sudo ssh -i ~/.ssh/mysshkey -l 81:<ip1>:81 -l 9200:<ip1>:9200  user@myhost.domain.com 

ssh_config entry

host logstash         hostname                <ip1>         port                    81 #        forwardx11             yes         localforward            81 <ip1>:81         localforward            9200 <ip1>:9200         user                    username         identityfile            ~/.ssh/mysshkey         serveraliveinterval     30         serveralivecountmax     120 #       loglevel                debug3 

host tunnel hostname database.example.com identityfile ~/.ssh/john.example.key localforward 9906 127.0.0.1:3306 user john 

equivalent of:

ssh -f -n -l 9906:127.0.0.1:3306 john@database.example.com 

with new config in place can run:

ssh -f -n tunnel 

source: http://nerderati.com/2011/03/17/simplify-your-life-with-an-ssh-config-file/


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -