Quote:
Originally Posted by Dan Suson
Unfortunately, ssh does not connect through the VPN.
|
Yeah, that's a firewall issue. But you can easily work around it by starting a reverse ssh session on the target machine. Eg:
Code:
$ ssh -fNR 22222:localhost:22 user@xx.xx.xx.xx
Where 'user' is your username and xx.xx.xx.xx is the IP address of the machine you'll be connecting to it
from. Leave the word 'localhost' in the command.
You can then connect to that machine by first connecting to the VPN and then:
Code:
$ ssh -p22222 user@localhost
Again, use the proper username, but leave the word 'localhost' in the command.
Note: You don't have to use port 22222, you can use any port up to 65535 (I think).
I use this to connect to my home machine from the office. The home machine connects to the VPN server in my office. Once I start the reverse ssh session on the home machine, I can ssh into it from the office. It doesn't work without the reverse ssh session because the home machine is behind a restrictive firewall.