Question

I cannot login via SSH after a droplet resize, is this normal?

Posted January 15, 2015 2.8k views

I needed to resize a droplet that I accessed via SSH keys, when I created the original droplet with a 1-click-install (ubuntu/rails) I avoided the root password email and went directly with the SSH key in the control panel UI.

I also disabled the root login with “PermitRootLogin without-password”

Then I turned the droplet off using “poweroff” and resized it. Now, the new resized droplet is asking me for a password when I “ssh mydomain.com”

Is there a way to connect via SSH as it was working before the resizing? Thanks!

2 comments
  • Edit the file ~/.ssh/authorized_keys and append the public key part of your SSH key. Create the file if it is missing. You probably know it, but just in case, the tilda (~) is the home directory of the user you are logging in with.

  • Also, if you can’t login as root and didn’t have an alternate login account (a non-root account with sudo access), then you may want to look at the recovery boot image tutorial. The ISO image boot is probably the section you’ll want to use.

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.

×
2 answers

Maybe you are using a wrong SSH port for connecting. Just a thought, maybe it is not correct.

Sometimes it could be the SSH port (22) doesn’t allowed by default when machines restarted.

If you could login to root, you might need to run the following command:

sudo ufw allow ssh
Submit an Answer