SFTP: Connection problem

HI,
I have generated public key and placed in remote server. When I am trying to do SFTP for that remote server the below error I am getting. Please help me to resolve

Connecting to hostname...
Sun_SSH_1.1.4, SSH protocols 1.5/2.0, OpenSSL 0x0090704f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to hostname [0.0.0.0] port 22.
debug1: connect to address 0.0.0.0 port 22: Connection refused
ssh: connect to host hostname port 22: Connection refused
Connection closed
  1. Make sure sshd is actually running. For instance ps auxww|grep sshd
  2. Make sure sshd is running on port 22. In some OS's like Linux, that's netstat -anp | grep :22
  3. Check the firewall settings. If enabled, post the rules for the INCOMING table.
  4. Check /etc/hosts.allow and /etc/hosts.deny. If not empty (after excluding comments), post here.
  5. Have you tried the SSH on the localhost (the server running the SSH daemon itself)?

Hey,

What you see when you telnet remote_server_ip 22 ?
And is there any deny rules for 22 in iptables? check iptables -L

Cheers..

Hi,

Apart from the checklist above, please do check sshd_config on the remote server if "subsystem sftp" line is either missing or commented out.

Thanks
-Raja

Please make sure following permissions are properly set.

chmod 700 .ssh;
chmod 640 .ssh/authorized_keys