LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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-28-2007, 01:56 PM   #1
palvit
LQ Newbie
 
Registered: May 2006
Posts: 13

Rep: Reputation: 0
ssh problem


One of my friends has some problem in installing some rpms as he is a newbie like me. i thought i might connect to his pc using ssh. So i told him to make a new user : useme and password : dontuse
then i told him to click on h**p://www.ipchicken.com
he got his IP adress as 59.178.77.156(his is dynamic so it will change next time).
So i executed
ssh 59.178.77.156 -l useme
but i could not get connected and got some error like ssh: connect to host 59.178.77.156 port 22:Connection timed out
please,tell me how to connect to his PC and then run commands there???
 
Old 01-28-2007, 01:58 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
Is there a firewall up on the remote machine?
Is sshd running on the remote machine?
Is there a hardware router between his connection and machine, or directly connected to the internet?
If router is involved has a portforward for ext IP port 22 to internal lan IP port 22 been setup.
Also I would connect using ' ssh username@xxx.xxx.xxx.xxx

Brian

Last edited by Brian1; 01-28-2007 at 02:00 PM.
 
Old 01-28-2007, 02:23 PM   #3
palvit
LQ Newbie
 
Registered: May 2006
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks for the reply.I think he is using some ADSL Router(ie a telephone line is being used for internet), and router is connected to LAN port of PC.How to establish "a portforward for ext IP port 22 to internal lan IP port 22 been setup".We both are newbies and i would be really greatful if you tell us the the steps to achieve it.
As for as ssh username@xxx.xxx.xxx.xxx is concerned, i tried it as well and am getting the same error.
ssh: connect to host 59.178.77.156 port 22:Connection timed out
Thanks in advance.
 
Old 01-28-2007, 04:20 PM   #4
porzech
Member
 
Registered: Jan 2007
Distribution: Suse, Ubuntu
Posts: 31

Rep: Reputation: 15
how you setup portforwarding on a router is dependent on what manufacturer and model it is but if his machine ip is different from not in nonroutable ip range he has so called public ip and the only problem might be sshd not runing or firewall blocking out ssh port please check that first

ps nonpublic ip ranges include
10.0.0.0 – 10.255.255.255
172.16.0.0 – 172.31.255.255
192.168.0.0 – 192.168.255.255

if his card has an address in this range he has so called nonroutable ip and port forwarding is needed in other cases there is no need to portforward anything
 
Old 01-28-2007, 06:29 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
You need to read the docs on the router and usually you use the web interface of the router to configure port forward. Refer to manufactories web site for FAQ or what ever. Then make sure the linux box on remote side has the firewall disabled or allows port 22 in. Every maker of routers do it different so no exact setup can be said.

Brian
 
Old 01-30-2007, 12:57 PM   #6
palvit
LQ Newbie
 
Registered: May 2006
Posts: 13

Original Poster
Rep: Reputation: 0
I think i dont know how to use ssh.
Can u tell me frm scratch how to use ssh to connect. e.g how to generate keys, and allow a user to access.
I just made a new user and tried to connect using the command.
I dont know if the user is to allowed, if so how to do it.
 
Old 01-30-2007, 11:44 PM   #7
porzech
Member
 
Registered: Jan 2007
Distribution: Suse, Ubuntu
Posts: 31

Rep: Reputation: 15
ok first on your frens computer type ifconfig this will output his computers network card configuration if the ip is (numbers following inet addr: from those ranges i mentioned you will need to reconfigure router to forward port 22 to his computer

if you are not sure just post output of this command here
and one more thing please tell us what distribution of linux is installed on yours and your friends computers this would give us more info couse different distros store their configs differently

ps to check if ssh deamon is runing try typing ps -al and searchin its output for sshd or similar
 
Old 01-31-2007, 04:37 PM   #8
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
Check out this site to setup ssh. http://www.suso.org/docs/shell/ssh.sdf

Brian
 
Old 02-03-2007, 12:17 PM   #9
palvit
LQ Newbie
 
Registered: May 2006
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks

Thanks, porzech and Brian1. I had an IP address in range as u mentioned and i needed to portforward 22, and it worked. One more thing i am using Fedora Core 2. I had to execute service sshd start first to start the Daemon. Then it worked fine.
Thanks, again.
 
  


Reply

Tags
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-agent, ssh-add and ssh-keygen AND CVS raylpc Linux - General 2 11-19-2008 02:50 AM
SSH problem - ssh-add not respond FerkoPica Linux - Security 6 05-07-2006 03:47 PM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 12:34 PM
ssh problem after creating an ssh alias. porotothorpe Linux - General 2 01-25-2006 07:56 PM


All times are GMT -5. The time now is 11:23 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