1753875 Members
7659 Online
108809 Solutions
New Discussion

ping works, ssh doesn't

 
EU-Admins-UNIX
Regular Advisor

ping works, ssh doesn't

Hi

 

I can ping from server A to server B, and vice versa.

I can ssh from server B to server A BUT cannot ssh from server A to server B

I can ssh from server A to servers C, D, E, etc........

 

Please see below:

 

root@serverA at /scratch/tariq/oracle =>ssh -v serverB

OpenSSH_5.1p1+sftpfilecontrol-v1.2-hpn13v5, OpenSSL 0.9.7m 23 Feb 2007
HP-UX Secure Shell-A.05.10.026, HP-UX Secure Shell version
debug1: Reading configuration data /opt/ssh/etc/ssh_config
debug1: Connecting to serverB [172.20.0.12] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/3
debug1: identity file /.ssh/identity type -1
debug1: identity file /.ssh/id_rsa type 1
debug1: identity file /.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_5.1p1+sftpfilecontrol-v1.2-hpn13v5
debug1: match: OpenSSH_5.1p1+sftpfilecontrol-v1.2-hpn13v5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1p1+sftpfilecontrol-v1.2-hpn13v5
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: AUTH STATE IS 0
debug1: REQUESTED ENC.NAME is 'aes128-cbc'
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: REQUESTED ENC.NAME is 'aes128-cbc'
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'serverB' is known and matches the RSA host key.
debug1: Found key in /.ssh/known_hosts:22
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
Connection closed by xxx.xxx.xxx.xxx

 

where xxx.xxx.xxx.xxx is the IPaddr of serverB.

 

Any ideas?

 

Tariq

2 REPLIES 2
Dennis Handly
Acclaimed Contributor

Re: ssh doesn't in one direction

>I can ping from server A to server B, and vice versa.

 

This doesn't tell us anything since ssh also connects but then drops:

debug1: Connecting to serverB [172.20.0.12] port 22.
debug1: Connection established.

 

Can you look at syslog on server B?  I'm not sure if using -vvv would give more useful info?

(I assume that 172.20.0.12 is your xxx.xxx.xxx.xxx?)

EU-Admins-UNIX
Regular Advisor

Re: ssh doesn't in one direction

Thanks all, it's sorted.

 

I put these values in the /etc/rsolv.conf file:

 

retry 1
retrans 200

 

Thanks & Regards

 

Tariq