I'm ussing this command to connect to my server and create a tunnel for MYSQL. Today I learn about ~/ssh/config and I want to know if it is possible to setup the port fordwarding in that file to able me to connect with an short name.

ssh admin@mydomain.com -L 3307:localhost:3306 -N -f
link|improve this question
feedback

migrated from stackoverflow.com Nov 12 '11 at 8:47

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 1 down vote accepted

Yes, you would use the Host option to specify a short name, and User, Hostname, LocalForward for the rest.

Example: http://www.cs.miami.edu/~burt/local/cs-arch-2002/http-tunnel-misc.html

TFM: http://www.openbsd.org/cgi-bin/man.cgi?query=ssh_config

link|improve this answer
Thank you, thats awasome!! I dont know the linux ssh client have that!! is just amazing! now i love key auth, tunneling, and ssh config file!! – Arnold Roa Jul 17 '11 at 23:53
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.