-   Linux - Networking (
-   -   SSH over the Internet to a local-network-specific IP (

sadarax 07-30-2007 05:31 AM

SSH over the Internet to a local-network-specific IP
I connect to a computer on a private network over the Internet. Previously, I configured the router of the local network to forward connection on a specific port I use for SSH to the Linux machine on the network.

So I would simply connect like this:

ssh -p 1234

What I want to know is how I can have SSH connect to a specific computer on the network with specific local IP address. I basically want to remove the router from the equation, and just have SSH connect to that network over the Internet, and then connect to a specific local machine.

Can this be done?

acid_kewpie 07-30-2007 06:55 AM

how does ssh connect to a network?? that doesn't appear to make any sense at all... what do you suppose you actually log into? a cable? what you've already got looks just fine from what you're saying you need. maybe you could explain what you are having troubles with? maybe you actually want to look at a vpn between two sites so you can use the local addresses from a remote location?

sadarax 07-30-2007 07:52 AM

Explanation: I am on a home computer. I want to connect over the internet to a remote machine on a different network. The remote machine does not have a unique Internet IP address. The only unique Internet IP address is being used by the router (lets call it

The remote machine I want to connect to has the local network address

To connect to this destination remote machine, in the past, I have normally had to configure the router to send traffic on a certain incoming port directed to a certain local IP. In this case, I would have to configure the Internet Router to send incoming traffic on port 22 to the local machine with the local network IP

I want to know if there is a method of avoiding configuring the router. The problem arises from the destination remote machine NOT having a unique Internet IP. I am wondering if there is a way to tell SSH to first connect to an Internet IP and then to a subsequent local network IP.

acid_kewpie 07-30-2007 08:35 AM

well that's the absolute total 100% point of port forwarding existing at all... as above, you could establish a VPN, .e.g, but that's not specfically what you are asking for.

All times are GMT -5. The time now is 09:02 AM.