1837314 Members
2730 Online
110116 Solutions
New Discussion

Re: ssh problem.

 
M. Tariq Ayub
Regular Advisor

ssh problem.

ssh: connect to address 10.10.20.31 port 22: Connection refused
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: ssh problem.

Lots of possible causes.

You could have a /var/adm/inetd.sec file that excludes the ip address you are connecting from. (check the file) (Also inetd -l tail -f /var/adm/syslog/syslog.log on the target server and try another login)

You could have no sshd deamon running on the target server.( on target server ps -ef | rep sshd to check /sbin/init.d/secsh start to start the daemon)

You could have a firewall blocking port 22.

You could have an expired password on the target server which means your public key exchange will fail.

You will note most of these problems are on the target box. I suggest you log on there and start following my notes above.

I also recommend you take some time to add more problem description. For example, did you exchange public keys, things like that. More detail leads to less posts like mine which is really a fishing expedition.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
M. Tariq Ayub
Regular Advisor

Re: ssh problem.

ssh is running.
I can ping the IP
i can loginto that server using another it.
This ip is assigned by cmcluster
Sridhar Bhaskarla
Honored Contributor

Re: ssh problem.

Hi Tariq,

Run ssh with debug option and see if it works.

ssh -vvv remote_server

check /etc/hosts.deny file on the remote server to see if tcp_wrappers are in effect. Also look at /var/adm/syslog/syslog.log for more details on the remote server if you are sure that sshd daemon is running on it.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Jeroen Peereboom
Honored Contributor

Re: ssh problem.

Small chance you're trying to login as root, which may be disallowed in the sshd_config file (PermitRootLogin no).

JP
Marc Roger
Advisor

Re: ssh problem.

If it is "connection refused", it is probably not related to authentication issues. Also, sshd is generally not run from inetd (although it's possible), so inetd.sec may not explain why the connection is refused (and if you are running sshd from inetd, don't forget to check for a "ssh" entry in /etc/services)

To rule out a network problem (eg firewall blocking port 22) try to connect from the local host on the server, if that fails, check that the ssh daemon is running and listening on port 22 (you can configure sshd to listen to other ports with the "Port" directive in sshd_config), the "lsof" utility may be of some use here.