-2

This question already has an answer here:

I want to introduce ssh authentication and I have configured the ssh_config file and disabled passwordauthentication. Now, im trying to access the machine using ssh but the access is denied! Is there any way to access the machine now using password?

marked as duplicate by Rui F Ribeiro, GAD3R, Anthon, Scott, Satō Katsura Aug 30 '17 at 5:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    A console login. – datUser Aug 29 '17 at 14:32
  • 2
    If you disabled password authentication in sshd_config, then you cannot authenticate with password when accessing via ssh. – sebasth Aug 29 '17 at 14:33
0

Yep, put on your running shoes: You need to visit the machine in person, log in via console, and turn passwordauthentication back on.

If it's not a real box, you may need to mount a bootable ISO and use Rescue Mode.

Also, set yourself up with a pre-shared key (try "man ssh-copy-id") and enable these 3 lines in /etc/ssh/sshd_config, to give yourself a backup in the future:

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile  .ssh/authorized_keys

Then generate and copy over a RSA key. Good luck!

  • Thank you. I will try this and tell you later the result – user3232446 Aug 29 '17 at 16:03

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