LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 01-02-2006, 07:07 PM   #1
mikesjays
Member
 
Registered: Dec 2005
Distribution: FC8, FC9, FC10
Posts: 30

Rep: Reputation: 15
PuTTY hostname problem


I have 2 SSH servers runnig behind a router/firewall. I would like to PuTTY into both of them. I can't figure how to tell PuTTY witch one to loginto. With using SSH on my Liux box I can use:

> ssh -l (user name) (box1).mywebdomain.com

or

> ssh -l (user name) (box2).mywebdomain.com

but I'm not sure what need to go where with PuTTY.
 
Old 01-02-2006, 07:57 PM   #2
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
Have you forwarded an external port to each internal ssh server? This is what I would do. I assume this is one of them store bought routers.

Requiremnets first.
Make all internal machines use static IP not dynamic.
Then from the router configuration you need to add some portforwarding .
Use this as and example:
Lets use port number 5001 for the first ssh machine and port 5002 for the second machine.
Now add a portforward from external IP with port 5001 to internal machine 1 with internal IP and port 22.
Same for the second external IP with port 5002 to internal machine 2 with internal IP and port 22.

Better example:
External IP a.b.c.d (use your external IP here)
Internal IP #1 192.168.1.2
Internal IP #2 192.168.1.3
Now once portforwarding is defined in above then all you need to use from outside is IP of a.b.c.d port 5001 to first machine, 5002 to second.

So when you ssh to a.b.c.d:5001 it portforwards to 192.168.1.2:22
ssh -l (username) a.b.c.d:5001

Hope this helps.
Brian1

Last edited by Brian1; 01-02-2006 at 07:58 PM.
 
Old 01-02-2006, 08:45 PM   #3
mikesjays
Member
 
Registered: Dec 2005
Distribution: FC8, FC9, FC10
Posts: 30

Original Poster
Rep: Reputation: 15
I'm using a store bought router and I have the forwarding setup. The problem I'm having is not with SSH because I can tell it what host to connect to but I having the problem with PuTTY. For some reason it can't tell what server to connect to. any ideas?
 
Old 01-02-2006, 09:25 PM   #4
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 48
When you said you can ssh in using your Linux box, where is this box? And where is the computer you're using putty from? If they are both outside the router, then you should be able to enter the same thing into putty, e.g. username@box1.mywebdomain.com and it should work.

Last edited by spooon; 01-02-2006 at 09:26 PM.
 
Old 01-05-2006, 04:05 PM   #5
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
Need to define what you are forwarding. How does the router know which box is which? Is it using hostnames or dns?

Brian1
 
  


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
problem saving putty settings ddaas General 3 01-13-2005 04:59 PM
Putty / SSH Problem on Mandrake 10.0 jalperin Linux - Newbie 1 09-02-2004 12:25 PM
PuTTY Connection Problem mijenks Linux - Networking 14 05-04-2004 09:50 AM
Putty problem in communication dickkniep Linux - Networking 1 03-07-2004 06:58 PM
Problem with Putty...weird tarballed Linux - General 4 04-09-2003 01:38 PM


All times are GMT -5. The time now is 09:27 PM.

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