Cannot ssh into RHEL 5.5 server unless SSHD server debug is enabled
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Cannot ssh into RHEL 5.5 server unless SSHD server debug is enabled
Hello All,
I cannot ssh into an RHEL 5.5 server (192.168.20.104) from another RHEL 5.5 server (192.168.20.101) unless server debug is turned on 192.168.20.104, and even then, I have to wait several minutes before the connection is established. scp to and from the 104 server is also not working.
Here is the debug output on the 101 server when server debug is not enabled on the 104 server-:
Code:
[applmgr@tclg-clone-01 ~]$ ssh -vvv 192.168.20.104
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.20.104 [192.168.20.104] port 22.
debug1: connect to address 192.168.20.104 port 22: Connection refused
ssh: connect to host 192.168.20.104 port 22: Connection refused
Here is the debug output on the 101 server when server debug is enabled on the 104 server-:
Code:
[applmgr@tclg-clone-01 ~]$ ssh -vvv 192.168.20.104
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.20.104 [192.168.20.104] port 22.
debug1: Connection established.
debug1: identity file /home/applmgr/.ssh/identity type -1
debug1: identity file /home/applmgr/.ssh/id_rsa type -1
debug1: identity file /home/applmgr/.ssh/id_dsa type -1
debug1: loaded 3 keys
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3
debug1: match: OpenSSH_4.3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour128,arcfour256,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
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
debug2: dh_gen_key: priv key bits set: 130/256
debug2: bits set: 537/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug3: check_host_in_hostfile: filename /home/applmgr/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 5
debug1: Host '192.168.20.104' is known and matches the RSA host key.
debug1: Found key in /home/applmgr/.ssh/known_hosts:5
debug2: bits set: 520/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/applmgr/.ssh/identity ((nil))
debug2: key: /home/applmgr/.ssh/id_rsa ((nil))
debug2: key: /home/applmgr/.ssh/id_dsa ((nil))
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug3: start over, passed a different list publickey,gssapi-with-mic,password
debug3: preferred gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup gssapi-with-mic
debug3: remaining preferred: publickey,keyboard-interactive,password
debug3: authmethod_is_enabled gssapi-with-mic
debug1: Next authentication method: gssapi-with-mic
debug3: Trying to reverse map address 192.168.20.104.
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found
debug1: Unspecified GSS failure. Minor code may provide more information
No credentials cache found
debug2: we did not send a packet, disable method
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/applmgr/.ssh/identity
debug3: no such identity: /home/applmgr/.ssh/identity
debug1: Trying private key: /home/applmgr/.ssh/id_rsa
debug3: no such identity: /home/applmgr/.ssh/id_rsa
debug1: Trying private key: /home/applmgr/.ssh/id_dsa
debug3: no such identity: /home/applmgr/.ssh/id_dsa
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
applmgr@192.168.20.104's password:
debug3: packet_send2: adding 48 (len 61 padlen 19 extra_pad 64)
debug2: we sent a password packet, wait for reply
At this point, I use Ctrl + C to stop SSHD server debug on the 104 server, and the connection is lost on 101-:
Code:
Connection to 192.168.20.104 closed by remote host.
Connection to 192.168.20.104 closed.
debug1: Transferred: stdin 0, stdout 0, stderr 91 bytes in 21.3 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 4.3
debug1: Exit status -1
I recently installed RHEL 5.5 on 104, and scp was working just fine until I installed some rpm's required for Oracle 11i Apps and edited the /etc/hosts file as well as the /etc/resolv.conf file. At that point, I restarted the server and have since been unable to ssh into it. I am however able to VNC into the server from Windows 7.
I have tried restarting the sshd service on 104. Additionally, the firewall is disabled, and SELinux is also set to disabled on both servers.
I appreciate any suggestion and any offer of help. Thank you in advance.
I am able to ping 104 from 101, but I am unable to telnet to 104 from 101.
It is just so frustrating that ssh works when server debug is enabled. That feature is supposed to help you debug connection issues! It is of no help if the connection succeeds because then there is no "connection closed" debugging output to analyze. So frustrating!
it might be port 25 is closed, try doing an "iptables -nvL" and copy/paste the results here if possible, else you will have to decode the output yourself.
I reversed my changes to the /etc/resolv.conf file, and ssh and scp are working again, though much slower than usual.
The following was removed from the file -:
Code:
options attempts:5
options timeout:15
I will log a Service Request with Oracle explaining the problems I had after editing the /etc/resolv.conf file as recommended by them. r3sistance, thanks for all your help. :-)
Interesting, ... from the server itself, are you able to ping URLs? I am suddenly suspicious the issue is mis-configured DNS servers within resolv.conf itself.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.