Question

access my ubuntu server windows powershell.

Posted June 8, 2021 364 views
Linux BasicsUbuntuGetting StartedSecuritySystem ToolsUbuntu 20.04

Everytime I try to access my ubuntu server using SSH on windows powershell get the following error message: “Permission denied (publickey,password,keyboard-interactive)”.

This a in new Ubuntu 20.04.2 server I just installed on a raspberry Pi4 and on a Vbox VM as well. I haven’t created a public/private key pair, I’m just trying to access using my user passowrd, and I want to now if I need to change some configuration(s) on my windows PC or what do I have to change on my ubuntu server so I can get access and then do the public/private key pair or if there’s already one created in linux, how can is send it my Windows machine so I can get access to the server?

I’m confused and hope you can understand my question(s) and provide a resoluton.

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.

×
Submit an Answer
2 answers

Hi @roimertejeda,

So, let’s talk about the SSH keys. This is the most secure way there is but if you didn’t add your SSH key to your account prior to creating your Droplet, even if you create the Key now, it won’t be added.

You can read more about that here:

https://docs.digitalocean.com/products/droplets/how-to/add-ssh-keys/

Having said that, you can try following this Documentation, it takes you through the process of uploading your SSH Key to an Existing Droplet:

https://docs.digitalocean.com/products/droplets/how-to/add-ssh-keys/to-existing-droplet/

Lastly, if it doesn’t work, you’ll need to your Droplet’s Web Console to connect to it and allow authenticating with a password. Once you have that, ou should be able to add your Key without a problem.

https://docs.digitalocean.com/products/droplets/resources/console/

Hello, @roimertejeda

You can create a pair of ssh keys on your Windows machine and then copy them to your Ubuntu server running on the Raspberry Pi.

You can follow this link on how to create ssh keys on a Windows machine:

https://docs.digitalocean.com/products/droplets/how-to/add-ssh-keys/create-with-putty/

You can also temporary enable the PasswordAuthentication on the Ubuntu server in order to copy the ssh key over from the Windows machine.

The key can be copied over using the ssh-copy-id command

  • ssh-copy-id -i ~/.ssh/id_rsa.pub $user@IP_or_Hostname

Hope that this helps!
Regards,
Alex