LinuxQuestions.org
Help answer threads with 0 replies.
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 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
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
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: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
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
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
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
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
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 jsaravana87; 11-21-2012 at 11:17 PM.
 
  


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
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

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

All times are GMT -5. The time now is 02:45 AM.

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