LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-06-2008, 01:07 PM   #1
dream.impres
LQ Newbie
 
Registered: Aug 2008
Posts: 7

Rep: Reputation: 0
OpenSSH via Router


Hi, is me again. I had downloaded OpenSSH and installed successfully and had tried to remotely login to my fren PC using cable (Point to Point connection). Now, if i want to connect it via a router, how can i make it? Can i get any connection information from the command ip addr?
 
Old 08-06-2008, 01:17 PM   #2
johnson_steve
Senior Member
 
Registered: Apr 2005
Location: BrewCity, USA (Milwaukee, WI)
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152

Rep: Reputation: 46
It doesn't matter if it's a direct cable between 2 computers, through a router or on the other side of the world over the Internet. if you have the IP address or a resolvable hostname you can connect with ssh as long as there isn't a firewall in between blocking the port.
 
Old 08-06-2008, 01:17 PM   #3
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 83
Ok, in order to make this work, you need to setup NAT (Network Address Translation) for port 22 in your router to point to port 22 on the machine running OpenSSH. Then when you ssh to your 'router' it will 'translate' port 22 on the router to port 22 on your OpenSSH machine.

Hope that makes sense! It's relatively easy to do if you have a relatively new router with a web interface. Mostly the address for your router will be something like:

192.168.1.254

or

192.168.0.254

Try clicking on either of the above links and see if it opens something in your browser. If it does, you're half way there!
 
Old 08-06-2008, 02:26 PM   #4
dream.impres
LQ Newbie
 
Registered: Aug 2008
Posts: 7

Original Poster
Rep: Reputation: 0
basically if i wanna connect to another PC....i will
root... # ssh someonename@192.168.xxx.xx something like that, rite?
do i need to set the eth0 or eth1? or basically it already assigned the IP over the router which i can connect to? Thnaks
 
Old 08-06-2008, 02:50 PM   #5
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 83
that's correct, if and only if, both machines are running on the same router. from your first post, I'm presuming that your friends machine is in a different location, i.e., network to yours. If that is the case, you will need to setup NAT as I explained in the last post.
 
  


Reply


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
OpenSSH dream.impres Linux - Newbie 5 08-05-2008 02:31 AM
openssh bong.mau Linux - Software 2 11-09-2005 01:04 PM
X by openSSH Grimmy Linux - Security 2 03-16-2003 09:43 AM
OpenSSH gregoryfrancis Linux - General 4 03-02-2003 02:09 PM
OpenSSH Tarantismic Yak Linux - Security 2 07-14-2001 05:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:06 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration