[memo] ssh config example
config example
))) LocalForward
"172.16.1.1:22001" and "10.1.1.1:11008" is accessible by "192.168.1.1" only.
Host step Hostname 192.168.1.1 User user LocalForward 22221 172.16.1.1:22001 LocalForward 22222 10.1.1.1:11008 Host server1 HostName 127.0.0.1 Port 22221 User user1 Host server2 HostName 127.0.0.1 Port 22222 User user2
))) same as
ssh -L 22221:172.16.1.1:22001 -L 22222:10.1.1.1:11008 user@192.168.1.1
))) use
- ssh step
- ssh server1 ( other console )
- ssh server2 ( other console )
))) debug sample
ssh -v step debug1: Local connections to LOCALHOST:22221 forwarded to remote address 172.16.1.1:22001 debug1: Local forwarding listening on 127.0.0.1 port 22221. debug1: Local connections to LOCALHOST:22222 forwarded to remote address 10.1.1.1:11008 debug1: Local forwarding listening on 127.0.0.1 port 22222.