1826464 Members
3148 Online
109692 Solutions
New Discussion

sftp connection refused

 
Hanry Zhou
Super Advisor

sftp connection refused

When I run sftp to hostA, got connection refused, please see the following, can anybody please let me know what is the reason caused the problem?


root]# sftp -v bmsbroad@hostA
Connecting to hostA...
OpenSSH_3.1p1, SSH protocols 1.5/2.0, OpenSSL 0x0090602f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: restore_uid
debug1: ssh_connect: getuid 0 geteuid 0 anon 1
debug1: Connecting to hostA [hostA IP] port 22.
debug1: temporarily_use_uid: 0/0 (e=0)
debug1: restore_uid
debug1: temporarily_use_uid: 0/0 (e=0)
ssh: connect to address hostA port 22: Connection refused
debug1: restore_uid
Couldn't read packet: Connection reset by peer
none
5 REPLIES 5
Hanry Zhou
Super Advisor

Re: sftp connection refused

please let me know your thoughts on what reasons possibly caused the problem? firewall, sshd_config? Thanks,
none
Steven E. Protter
Exalted Contributor

Re: sftp connection refused

If the user id you are using has had a password expiration or lock via bad logins, the connection reset by peer message will happen.

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
Rick Garland
Honored Contributor

Re: sftp connection refused

From the looks of your output, port 22 is refusing the connection. What is blocking port 22 - the firewall, port 22 services not running on the client, etc.

Massimo Bianchi
Honored Contributor

Re: sftp connection refused

server is unix or windows ?


just today i solved the exact same problem on a window server.


the authorized_keyd must be readable by all, and this can be gained only with the cacls command on window.

If it is unix, check the permission of the same file, maybe the same problem.

Also, rise the level of logging to debug3, you should catch the exact error.

Massimo