1
1
I'm trying to connect to one of my internal computers (private ip) using SSH over the internet. The SSH port of that computer is not exposed so I first create a tunnel via a public resource (public ip).
ssh <public ip> -p 2022 -l root -L 127.1.1.1:2222:<private ip>:22
After that, I can create the SSH connection like this :
ssh username@127.1.1.1 -p 2222
Is it possible to execute this with a single command ?
This question is similar to this one http://superuser.com/questions/465423/redirect-all-ssh-traffic-through-a-middleman-server
– Johannes – 2013-08-23T19:34:31.150