You are not logged in.
Pages: 1
I have a ssh server in my remote work that I can access from home via 123.456.789:2203
Sometimes, i want to connect from my home to a port on an specific machine inside the work network.... I think this is what ssh tunneling is for....
So far, I managed to connect to the ssh server's ports:
ssh -N -p 2203 administrator@123.456.789 -L 3385/localhost/3385
But if i try to connect to the machine in the remote network's IP 192.168.1.1, this command:
ssh -N -p 2203 administrator@123.456.789 -L 3385/192.168.1.1/3385
does not work...... what am i doing wrong?
Offline
ports should be specified with a : not a /
Try something like:
ssh -N administrator@123.456.789:2203 -L 3385:localhost:3385
Offline
ports should be specified with a : not a /
Try something like:
ssh -N administrator@123.456.789:2203 -L 3385:localhost:3385
That does not work for me..... strange... i will try more things... if somebody else has some idea it would be much appreciated
Offline
oliver wrote:ports should be specified with a : not a /
Try something like:
ssh -N administrator@123.456.789:2203 -L 3385:localhost:3385
That does not work for me..... strange... i will try more things... if somebody else has some idea it would be much appreciated
if you copy-pasted that command, the problem is probably a few missing digits in the IP adress. The -L localport:adresss:remoteport works fine for me.
Offline
ssh: Could not resolve hostname xxx.xxx.xxx.xxx:2203: Name or service not known
That's what i get when i enter thae command for connecting....
Offline
ssh: Could not resolve hostname xxx.xxx.xxx.xxx:2203: Name or service not known
That's what i get when i enter thae command for connecting....
Maybe ssh doesn't like hostname:port in the initial connection. Try going back to using the -p 2203
ssh -N -p 2203 administrator@123.456.789 -L 3385:localhost:3385
Last edited by oliver (2011-03-06 06:04:33)
Offline
Ok, that works for the machine that has the ssh server but how to connect to another machine inside the same network?
ssh -N -p 2203 administrator@123.456.789 -L 3385:192.168.1.x:3385
Didnt work for me....
Offline
Are you sure it doesn't work? After executing that command, the remote port can be accessed through the tunnel by connecting with localhost:3385 (on the machine you create the tunnel).
Offline
Sorry... i was doing it wrong.... forgot that the prot gets mapped to your LOCALHOST port... so, instead of accessing the remote local ip like 192.168.1.x:444, i should do: localhost:444... my bad....
Thanks... now i got it working!!!
Offline
You can also create real tunnel (VPN like) with OpenSSH and it's -w option. That said, if you only want to reach a specific port on a specific host, forwarding with the -L (or -R) option is simpler and is all that's needed. But if you're interested, see the man page for ssh, and search for the VPN word.
Offline
Yes, because what i want to do is sort of making my local machine like if it was inside the remote network......
I will have a look..... thanks!!
Offline
Pages: 1