Score:0

New VPS - Permission denied (publickey)

br flag

I created an Oracle VM with Ubuntu, during which, I generated an ssh key pair, which I uploaded to Oracle.

This key allows me to login to the default user, and everything works fine.

I added however a new user, copied over the public key to the new authorized_keys in the new profile, but am unable to log in with my user. I actually changed the configurations in sshd to only allow the default user, and my own, but still to now success. I get a Permission denied (publickey) error.

I tried to generate a new keypair just for this custom user, and replaced the key in authorized_keys, and that didn't work either.

Any suggestions?

Please find the verbose output of my connection here: https://pastebin.com/JV3SABjh

Score:0
br flag

After carefully verifying all permissions settings (yes, I know), I verified that I messed it up, by changing the ownership of authorized_keys to root. Changing those permissions to the correct user, fixed that issue.

Note to self, always ensure .ssh and authorized_keys belong to the user you want to log in to, the folder is 0700 and the file 0600!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.