Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question

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

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

1 Answer 1

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

share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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