Your Ad Here

IBM AIX/UNIX system storage administration ksh/perl scripting

Showing posts with label SSH. Show all posts
Showing posts with label SSH. Show all posts

Friday, April 17, 2009

ssh_exchange_identification: Connection closed by remote host

Problem:

After upgrading openssh to version 5 on AIX server. Got the following error when trying to ssh into it.


$ ssh -l userid server
ssh_exchange_identification: Connection closed by remote host


Cause:

Somebody installed TCP wrapper which create a /etc/hosts.allow file with sample setting in it.


# cat /etc/hosts.allow
ALL: LOCAL @some_netgroup
ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
telnetd: toto@foo.foobar.edu, [3ffe:302:100::]

Solution:

Modify the /etc/hosts.allow to allow ALL
# cat /etc/hosts.allow
ALL:ALL

Restart sshd,

stopsrc -s sshd ; startsrc -s sshd


problem fixed.

Wednesday, July 02, 2008

ssh: w.x.y.z: Hostname and service name not provided or found

Error when run "ssh -l username w.x.y.z"
ssh: w.x.y.z: Hostname and service name not provided or found

Cause:

When you connect using a TCP/IP address, ssh expects to be able to perform a DNS reverse-lookup for the address provided. If the host name cannot be resolved or resolved to wrong hostname, this error is returned. To resolve the problem, have your DNS admin to correct the reverse DNS lookup.

# nslookup w.x.y.x
make sure it returns the correct hostname


Cause2:

If user root can ssh to remote server while normal user can't, then it means file /etc/resolv.conf does not have enough permisson to normal users.
# ls -l /etc/resolv.conf
# chmod o+r /etc/resolv.conf

Labels

BlogCatalog