Report this

What is the reason for this report?

Cannot SSH to droplet after OS upgrade

Posted on May 4, 2020

A couple months back I decided to upgrade the OS to FreeBSD 11.0. Post installation I cannot SSH with the keys provided to me. Suggestions please.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Use Access Console to log in using the console.

If you changed the ssh port previously, confirm its value in /etc/ssh/sshd_config

If you haven’t changed the root password, restart the droplet and boot into single user mode, mount the filesystem and change the root password. https://www.freebsd.org/doc/handbook/boot-introduction.html https://www.techrepublic.com/blog/it-security/recover-freebsd-root-access-when-you-forgot-the-password/

Good luck!

Hello, @versawestusersgroup

Could you please let me know if you’re getting a Permission denied (publickey) error message when you try to ssh to your droplet?

I will recommend you to follow this tutorial and setup new pair of ssh keys and then upload them to your droplet:

https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2

The first step is to create the key pair on the client machine (there is a good chance that this will just be your computer):

ssh-keygen -t rsa

If you have password authentication enabled on your droplet you can upload the id_rsa.pub key file directly to your droplet using the follow command:

cat ~/.ssh/id_rsa.pub | ssh root@IPaddress "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >>  ~/.ssh/authorized_keys"
  • change the IPaddress with the IP address of the droplet.

Hope this helps!

Let me know how it goes.

Regards, Alex

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.