Can't connect via SSH

Posted December 18, 2013 26.4k views
I trying connect to my droplet, but putty say "Network error: Connection refused". I can connect to droplet only using Console Access. SFTP not working too.
1 comment
  • i had the same problem but if you are runing UFW you have just to stop it or allow ssh access.
    you just have to login in your droplet and use ssh access to desable the firewale or to allow _ssh acess.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
14 answers
Try running these commands and then start ssh (service ssh start):
rm /etc/ssh/ssh_host_*

/usr/sbin/dpkg-reconfigure openssh-server
Did you edit /etc/ssh/sshd_config?
Is OpenSSH running?
sudo ps wwaux | grep ssh
I think no:
I trying:
No. Today I had rebuild my droplet (Ubuntu 12.04 x32)- installed LAMP, created user, edited apache config. Few hours ago I opened and connected to droplet using putty and tried connect to droplet via SFTP (FileZilla). FilleZillla say "Network error: Connection refused" and I closed and open putty and he also say "Network error: Connection refused".
Hmm. I believe openssh logs to syslog, check if there are any errors:
sudo tail -30 /var/log/syslog

sudo tail -30 /var/log/auth.log
So you have not edited anything in /etc/ssh/sshd_config? What do you have listed in the AllowUsers directive? Is the username listed, that you're attempting to log in with?
I did not open this directory never. I connect only as root
Previous 1 2 Next