Question

Having trouble using SSH to login as root user

Posted May 30, 2020 134 views
DigitalOcean

Beginner here. This seems like it should be a simple fix but I’ve been wracking my brain for a couple days and can not figure out how to connect to my droplet.

Context
OS: Windows 10
Shell: Bash (I’m on a new Windows computer but came from Mac so I downloaded bash so I can keep using UNIX commands)

Goal: I’m trying to SSH into my DO droplet

Steps I’ve taken:
1) I sudo into root user
2) checked the sshconfig file to allow root user log in
3) tried to ssh into my server with root login

ssh root@123.456.789.10
4) error code:
root@123.456.789.10: Permission denied (publickey).
5) I’ve generated new keys (ssh key-gen) several times. Each time, I overwrite old files
6) searched local machine for ssh keys (id
rsa) and nothing.

What could be the issue here? Are the keys misnamed? If I’m using bash, do I have to save the SSH keys in Ubuntu? I’m new to Microsoft, are there firewall settings that might be blocking the connection?

Any help would be very appreciated!

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.

×
1 answer

Hello, @jenkatan29

What you can do is to add your existing key to your droplet or generate a new ssh key and use the DigitalOcean’s console to add your key on the droplet.

I will recommend you to check these two articles:

How to Create SSH Keys with PuTTY on Windows

How-to Add SSH Keys to New or Existing Droplets

Since you already have generated your ssh-key you can follow the steps listed in the second tutorial and see if this solves your issue.

Let me know how it goes!

Regards,
Alex

Submit an Answer