2

I tried to ssh to one of our newly installed servers in our DC. Our NOC team is able to ssh the server from their machines. However, we usually connect to servers in our DC using landing machines, from which I can't connect my new server in the DC. I received the following output when I ran ssh in verbose mode.

OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to *.*.*.* [*.*.*.*] port 22.
debug1: Connection established.
debug1: identity file /home/ta/.ssh/identity type -1
debug1: identity file /home/ta/.ssh/identity-cert type -1
debug1: identity file /home/ta/.ssh/id_rsa type -1
debug1: identity file /home/ta/.ssh/id_rsa-cert type -1
debug1: identity file /home/ta/.ssh/id_dsa type -1
debug1: identity file /home/ta/.ssh/id_dsa-cert type -1
debug1: identity file /home/ta/.ssh/id_ecdsa type -1
debug1: identity file /home/ta/.ssh/id_ecdsa-cert type -1

ssh hangs here. I confirmed that there is no routing or access related issue. Telnet to port 22 is successful. What could be the problem?

  • The default TCP port for telnet is typically 23. Could you include your configuration files on the server? You may have a conflict between telnetd and OpenSSH. – Lucas Ramage Jul 16 at 12:26
  • tcp 0 0 127.0.0.1:2601 0.0.0.0:* LISTEN 37035/zebra tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 273385/sshd tcp6 0 0 :::22 :::* LISTEN 273385/sshd – Tarun V Jul 16 at 12:41
  • Thanks for the suggestion...port 22 is being used for sshd on the server more over we are able to ssh the same server from some other machine – Tarun V Jul 16 at 12:43
  • How do you connect? User/pass or ssh key? What do you have in auth.log? – Zumo de Vidrio Jul 16 at 13:30
  • I am connecting this with username and password – Tarun V Jul 16 at 13:41
1

I have changed the sshd to listen on some other port and it is working now(Temp fix).... I am confused that if the port 22 is blocked some where in the network, Telnet to the port 22 should not be successful...! but telnet to the port 22 was successful and the port was listened by sshd on the server...Asked the network team to check at their end.Still looking for the answer for the question why telnet to the port 22 was successful earlier?

-1

By looking at the debug info, you have configured the Passwordless SSH authentication.

I have seen a cases where the servers running with 2 SSH service (Openssh and Tectia), so in case the SSH key been created with Tectia then you may expect to see the passwordless authentication won't work, here you need to kill the Openssh service and OFF in the chkconfig level for a permanent fix.

  • "...and OFF in the chkconfig" doesn't make much sense. Can you please provide more information? – Lucas Ramage Jul 16 at 22:12
  • but the problem here is that ssh to the particular server is working from some machines... – Tarun V Jul 17 at 8:05
  • To make the service not to start when the server boots up, you can turn it off in the chkconfig command chkconfg <server_name> off To answer your 2nd question, check is there any any REJECT rule is been setup in the IPABLES (administration tool for IPv4 packet filtering and NAT), to know more details about IPTABLES go through "man iptables", iptables -L --> will list out all the defined rules – Prithvirajan Balakrishnan Jul 17 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.