Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSH Port forwarding in a ~/.ssh/config file? [closed]

People also ask

How do I SSH after port forwarding?

For remote port forwarding, enter the remote SSH server forwarding port in the Source Port field and in Destination enter the destination host and IP, for example, localhost:3000 . If setting up dynamic forwarding, enter only the local SOCKS port in the Source Port field.

Where is the SSH config file?

The ssh program on a host receives its configuration from either the command line or from configuration files ~/. ssh/config and /etc/ssh/ssh_config .


You can use the LocalForward directive in your host yam section of ~/.ssh/config:

LocalForward 5901 computer.myHost.edu:5901