LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 07-30-2007, 05:31 AM   #1
sadarax
Member
 
Registered: Sep 2005
Distribution: Ubuntu
Posts: 249

Rep: Reputation: 30
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 user@internet.ip.address.com

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?
 
Old 07-30-2007, 06:55 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967Reputation: 1967
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?
 
Old 07-30-2007, 07:52 AM   #3
sadarax
Member
 
Registered: Sep 2005
Distribution: Ubuntu
Posts: 249

Original Poster
Rep: Reputation: 30
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 www.someplace.com).

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

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 192.168.0.5.

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.
 
Old 07-30-2007, 08:35 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

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


Reply

Tags
connect, ip, local, network, router, ssh


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh wont connect outside of local network clintonkerr Linux - Software 9 09-20-2005 08:35 AM
can login to ssh via local network, but not outside brainlesspinkey Linux - Security 3 08-27-2005 05:12 PM
On local network - can't get to internet kook Linux - Wireless Networking 12 03-01-2005 10:45 AM
Can go Local network, can't go internet!! nectron101 Linux - Hardware 2 11-27-2004 10:03 AM
local network okay - no internet Who Linux - Networking 7 03-26-2003 02:06 PM


All times are GMT -5. The time now is 08:41 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration