0

I set up an SSH key and changed my username in keeping with some best practices, having previously lost a pi installation after it was likely compromised via bruteforce. Unfortunately, it appears I also set up a password for my local SSH key, as I get the prompt Enter your password for the SSH key "id_rsa". I've tried the passwords I could think of, and none work (`Permission denied (public key) error in Terminal).

I know I have saved the password I used when I first set up my modified user, so I tried this answer to ignore the key and use password instead. I got the same error from Terminal. How do I force key ignore and use password instead?

  • Have you removed the permission to use password authentication (PasswordAuthentication no`) from the ssh server configuration? – aastefanov Aug 21 '16 at 16:36
  • No, I currently can't access the pi via SSH - it's running headless in the office. Do I need to disable that? ... and so I'd guess that's a plug-in-kvm situation? – user3.1415927 Aug 21 '16 at 16:53
  • you need to enable password authentication (if disasbled, the only possible way may be to plug the SD Card in a Linux machine or a Windows with ext2fsd driver and edit the file) – aastefanov Aug 21 '16 at 17:29
  • So the headless -> headed option wouldn't do it? I thought that I could startx and go from there... – user3.1415927 Aug 21 '16 at 18:06
  • If you have a keyboard and a monitor, you could edit the file via sudo too. – aastefanov Aug 21 '16 at 19:04
2

In the article, one of the things mentioned is disabling password login:

PasswordAuthentication no

Commenting the line or changing the value to yes permits password login again.

  • 1
    An explanation of all the options can be found in man sshd_config, BTW. – goldilocks Aug 22 '16 at 1:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.