Having trouble using SSH to login as root user

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 ssh_config 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!


Submit an 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.

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