I had configured SSH login to my Digital Ocean Ubuntu server using SSH keys.
I am able to login using Git bash but when I use Window’s Ubuntu app, I get an authentication error:
Permission denied (publickey).
Log shows:
debug1: Next authentication method: publickey
debug1: Trying private key: /home/jlee/.ssh/id_rsa
debug3: no such identity: /home/jlee/.ssh/id_rsa: No such file or directory
debug1: Trying private key: /home/jlee/.ssh/id_dsa
debug3: no such identity: /home/jlee/.ssh/id_dsa: No such file or directory
debug1: Trying private key: /home/jlee/.ssh/id_ecdsa
debug3: no such identity: /home/jlee/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /home/jlee/.ssh/id_ed25519
debug3: no such identity: /home/jlee/.ssh/id_ed25519: No such file or directory
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
.ssh/jlee@165.227.201.83: Permission denied (publickey).
la -ls .ssh shows:
known_hosts
but not
authorized_key
authorized_keys
In gitbash,
ls -la .ssh
shows both:
authorized_keys
authorized_key
I am able to login using SSH keys through Git bash but not with Window’s Ubuntu app.
Any help?
Thank you.
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!
Hello, @kilmet8
If you’re connecting from a Windows machine you can also use the PuTTY ssh client in order to connect. You can find more information here:
https://www.digitalocean.com/docs/droplets/how-to/connect-with-ssh/putty/
You can check this tutorial on how to setup/generate the SSH keys on Windows 10:
https://ubuntu.com/tutorials/tutorial-ssh-keygen-on-windows#3-key-generation-with-ubuntu
You can upload the id_rsa.pub in the mentioned directory:
C:\Users\%USERNAME%\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\
or create a new ssh key and then upload it to your DigitalOcean’s droplet in the ~/.ssh/authorized_keys file
Hope this helps! Let me know how it goes.
Regards, Alex
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.