Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-18-2005, 02:17 PM
|
#1
|
Member
Registered: Aug 2005
Posts: 33
Rep:
|
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?
|
|
|
09-18-2005, 02:21 PM
|
#2
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
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.
|
|
|
09-18-2005, 02:24 PM
|
#3
|
Member
Registered: Aug 2005
Posts: 33
Original Poster
Rep:
|
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.)
|
|
|
09-18-2005, 03:22 PM
|
#4
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
Just the same as you would on your local network:
ssh user@remote.ip.or.hostname
|
|
|
09-18-2005, 05:02 PM
|
#5
|
Member
Registered: Aug 2005
Posts: 33
Original Poster
Rep:
|
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?
|
|
|
09-19-2005, 01:05 PM
|
#6
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
If the machines do not have publicly addressable IP addresses then yes, you will need to do this
|
|
|
09-19-2005, 02:45 PM
|
#7
|
Member
Registered: Aug 2003
Location: GA
Distribution: Fedora Core 4 Desktop/Server.
Posts: 361
Rep:
|
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 02:47 PM.
|
|
|
09-19-2005, 07:33 PM
|
#8
|
Member
Registered: Aug 2005
Posts: 33
Original Poster
Rep:
|
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@hostname ort 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?
|
|
|
09-20-2005, 05:32 PM
|
#9
|
Member
Registered: Aug 2003
Location: GA
Distribution: Fedora Core 4 Desktop/Server.
Posts: 361
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 06:36 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|