Not able to login through putty to droplet - I received connection refused error

January 9, 2015 3k views

I created a new droplet in SG. Not able to login through putty.
It says connectin refused and gets shut down.
I tried to ssh from another unix nstance with ssh root@128.XXX.XXX.XXX
I got "Connection Refused" error
Please help me resolve as working through console is very pain ful

1 comment
  • While logged in at the web console, run

     tail -f /var/log/auth.log
    

    Then from Putty, try to log in. Note any error messages that have the IP address of where your Putty session originates from.

2 Answers

I tried the Ubuntu set up steps ate: https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-12-04
The error I am gettin gis: Connection closed by 128.XXXXXXX

by Etel Sverdlov
This tutorial covers how to login with root, how to change the root password, how to create a new user, how to give the new user root privileges, how to change the port, and how to disable root login in. This tutorial is written for Ubuntu. When you first create your server, this tutorial explains the first steps you need to take. This tutorial is written for Ubuntu 12.04.

Is root Login enabled?

$ sudo nano /etc/ssh/sshd_config
PermitRootLogin yes

$ sudo service ssh restart

It should be enabled on your first boot but maybe they changed it to deny. If it is that go ahead and enable it, make a new account (say john), add him to the sudo group & try to login with that account. If it works you can then disable root login.

Have another answer? Share your knowledge.