logo

Using ssh-keygen for generating ssh keys

I wanted to create a ssh key for the web server ssh login. I searched and found this article . I have used ssh-keygen in the past by reading a tutorial, but this time I wanted to learn about it properly After reading the article, I learned I could select the cryptographic algorithm for generating the key. ssh-keygen -t algotype -b keysize -f /path/filename I tried generating the keys with different algorithms and different key sizes.

Permission denied (publickey) Digital Ocean

Today I redeemed Digital Ocean’s offer from the GitHub student pack, which gave me 100$ worth of credit for the next one year, which will be enough for me to learn self-hosting. I created a basic droplet using a non-root user and generated an ssh-key for login; however, I was getting an error “root@ipaddress: Permission denied (publickey).” After reading a lot of blogs yet, I was not able to find the solution.