1

I've just installed Ubuntu Core 16 on a Raspberry Pi 3. When I login using my private ssh key, it always needs a password.

I installed it by following the official provided guide.

screenshot

muru
  • 197,895
  • 55
  • 485
  • 740
jone
  • 11
  • where is the key, you imported to the SSO server? Did you go through the "First boot" procedure? – Jakuje Aug 21 '17 at 08:30
  • yes,the id_rsa.pub is imported to SSO,and the private key is kept on .ssh.whatever i tried to use ssh to login ubuntu core, it alwaysneeds a password. – jone Aug 21 '17 at 14:53
  • "Did you go through the "First boot" procedure?" – Jakuje Aug 21 '17 at 14:53
  • yes,it‘s the "First boot" procedure. – jone Aug 21 '17 at 15:11
  • OK. Is the key you uploaded to SSH the id_rsa or something else? – Jakuje Aug 21 '17 at 15:12
  • i can not absolutely understand "uploaded to SSH".the id_rsa.pub is imported to ubuntu one,and the private key is kept on .ssh. – jone Aug 21 '17 at 15:22
  • In your log, the id_rsa key is rejected by pi. It means that you put the wrong key to the SSO or into ~/.ssh/id_rsa, or you did not configure the system in the first boot section. Or you are using a wrong username from the configuration. – Jakuje Aug 21 '17 at 15:25
  • I had this problem and in my case the ssh-agent was not finding the key. After adding the key with the command below I was able to login. ssh-add I found this solution here https://askubuntu.com/a/762558/857041 – Steve J Dec 09 '18 at 23:14

1 Answers1

1

For someone who might get the same confusion as me: I also followed the tutorial from Ubuntu website, but in the final step, log in via ssh, I was required to enter a password.

Load key "/home/chin/.ssh/ubuntucore_rsa": bad permissions debug1: Next authentication method: password [email protected]'s password:

This problem was caused by my private rsa file was poorly protected. So I used the following command to modify its permission

sudo chmod 400 ~/.ssh/ubuntucore_rsa

Then I could login to Ubuntu Core via ssh.

pbhj
  • 3,231