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 11-16-2012, 01:08 AM   #1
screwzm
LQ Newbie
 
Registered: Oct 2012
Posts: 16

Rep: Reputation: Disabled
ssh problem.


I can ping hostb from hostb, but when I try to ssh into hostb from hosta:
Code:
ssh hostb command
It prompts the error msg as below:
Code:
ssh: connect to host hostb port 22: Connection timed out ...
What's the problem? Can anyone give me any clue on how to solve this problem. Any help is appreciated a lot. Thanks.
 
Old 11-16-2012, 01:22 AM   #2
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Debian, SL
Posts: 5,247

Rep: Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128
Hi,

are you sure sshd is running on hostb? Can you ssh from hostb to hostb? Eg on hostb
Code:
ssh localhost
Evo2.
 
Old 11-16-2012, 01:31 AM   #3
screwzm
LQ Newbie
 
Registered: Oct 2012
Posts: 16

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by evo2 View Post
Hi,

are you sure sshd is running on hostb? Can you ssh from hostb to hostb? Eg on hostb
Code:
ssh localhost
Evo2.
I am sure that sshd is running in hostb, I can ssh localhost within hostb.
May this caused by pam setting? Totally lost..
 
Old 11-16-2012, 01:38 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Can you telnet from hosta to hostb port 22?
Code:
# from hosta
telnet hostb 22
If that times out then either sshd isn't running (correctly) and/or you have a firewall issue and/or the hostname is wrongly resolved.
 
Old 11-20-2012, 11:35 AM   #5
icarusthecow
LQ Newbie
 
Registered: Sep 2012
Posts: 4

Rep: Reputation: Disabled
what distribution is the sshd running on? If its centos or opensuse or something similar, iptables is likely running and blocking the packets. Alternatively is the server behind a router?
 
Old 11-21-2012, 05:38 PM   #6
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Debian, SL
Posts: 5,247

Rep: Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128Reputation: 1128
HI,
Quote:
Originally Posted by screwzm View Post
I am sure that sshd is running in hostb, I can ssh localhost within hostb.
May this caused by pam setting? Totally lost..
As I suggested in my first post: check the log on the machine running sshd.

Evo2.
 
Old 11-21-2012, 11:09 PM   #7
arun5002
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 549
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
I can ping hostb from hostb, but when I try to ssh into hostb from hosta:
ssh: connect to host hostb port 22: Connection timed out

1.Check your firewall setting on hostb .Whether you had opened the Port 22 to host A interface ipaddress.

2.Check out Tcp wrappers hosts.deny whether you had denied ssh access

2.How do you try to login from hosts A to hostB using ssh -IPADDRESS ,hostname .Try out using ipadress .

3.ssh -v hostb debug using verbose o/p

Last edited by arun5002; 11-21-2012 at 11:17 PM.
 
  


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
Chroot SSH problem: ssh working, not SFTP & SCP. NaCo Linux - Security 3 02-01-2009 02:23 AM
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
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 06:57 AM.

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