LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 09-18-2005, 01:17 PM   #1
JohnStormrider
Member
 
Registered: Aug 2005
Posts: 33

Rep: Reputation: 15
Question Remote access question. (ssh)


Can I use ssh to connect to another computer and have root acess to it that is in another state on a seperate network then the one I am on? if not is there any way to to that?
 
Old 09-18-2005, 01:21 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Yes. Depending on the setup of the remote machine it may not permit root logins so you may need to login as a normal user and then su to root.
 
Old 09-18-2005, 01:24 PM   #3
JohnStormrider
Member
 
Registered: Aug 2005
Posts: 33

Original Poster
Rep: Reputation: 15
Cool. I am using SuSE 9.3 FTP install. I would have the same install put on those machines. so ssh demon will be started up on boot up.

How would I do that with ssh? (I know how to connect to a computer through ssh on my local network.)
 
Old 09-18-2005, 02:22 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Just the same as you would on your local network:
ssh user@remote.ip.or.hostname
 
Old 09-18-2005, 04:02 PM   #5
JohnStormrider
Member
 
Registered: Aug 2005
Posts: 33

Original Poster
Rep: Reputation: 15
kool.

Would it be any different if the computers I wanted to access were behind a router?

Some one else I asked said that I would need to have the router forward port 22 to one of the computers and use ssh from that computer to reach the other ones. What do u think?
 
Old 09-19-2005, 12:05 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
If the machines do not have publicly addressable IP addresses then yes, you will need to do this
 
Old 09-19-2005, 01:45 PM   #7
FLOODS
Member
 
Registered: Aug 2003
Location: GA
Distribution: Fedora Core 4 Desktop/Server.
Posts: 361

Rep: Reputation: 30
It'd probably be a good idea to setup a DynDNS account.
What you'll need to do to the router on the other machines is forward 22 on one machine, and then setup the other client to use a different port and forward that one to that machine. Then when you connect to the second computer use user@hostname:port and it should work fine.

If there's a different way to do this, someone please say so, however this is the only way I've known how to do this thus far.

Last edited by FLOODS; 09-19-2005 at 01:47 PM.
 
Old 09-19-2005, 06:33 PM   #8
JohnStormrider
Member
 
Registered: Aug 2005
Posts: 33

Original Poster
Rep: Reputation: 15
Quote:
It'd probably be a good idea to setup a DynDNS account.
What you'll need to do to the router on the other machines is forward 22 on one machine, and then setup the other client to use a different port and forward that one to that machine. Then when you connect to the second computer use user@hostnameort and it should work fine.

If there's a different way to do this, someone please say so, however this is the only way I've known how to do this thus far.
So:

[MY COMPUTER] ssh blablabla --> <router> (forwards port 22) --> [one of 4 computers] ssh blablabla --> [any of the other 3 computers]

Why would I need DynDNS?
 
Old 09-20-2005, 04:32 PM   #9
FLOODS
Member
 
Registered: Aug 2003
Location: GA
Distribution: Fedora Core 4 Desktop/Server.
Posts: 361

Rep: Reputation: 30
Well, if your ISP gives you a dynamic IP address and not static, it's going to be constantly changing.
With a DynDNS account, you can get a hostname for yourself (such as computername.homelinux.net) that will make it easier for you to connect to.
You can then try some of their tools to automatically update their server with your renewed IP when you get a new IP.
Remembering hostnames is just easier than remembering what my IP changed to every time, but if you're on a static IP, then no worries.

I also thought you were going to have a different layout. You are going to ssh to one computer in the network, and then connect to any of the other three from that one. What I've done it setup different ports per computer, and saved them in putty. I then have hostnames for all of the computers just to make things easier for myself.
Looks like you've got everything wrapped up now, though.
Good luck.
 
  


Reply



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
vnc or remote access question coal-fire-ice Solaris / OpenSolaris 13 08-13-2005 01:06 PM
ssh and other remote access to a firewall. Insane? fipeso Linux - Security 9 05-04-2005 12:37 AM
pts/0 etc. Remote access question hamish Linux - Networking 0 06-05-2004 02:25 AM
Remote Access Question yktang Linux - Newbie 1 04-03-2004 12:08 AM
Real Noobie question. Remote XTERM access BigT Linux - Newbie 5 03-01-2004 02:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:53 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
Open Source Consulting | Domain Registration