Disable YubiKey ssh authentication for my server

Linode Staff

I've followed the instructions for enabling YubiKey authentication over ssh in your article How to use a YubiKey for Two-Factor Secure Shell Authentication.

How do I disable this and use public key authentication instead?

1 Reply

To disable YubiKey authentication over ssh, you can modify your ssh configuration file by running the command: sudo nano /etc/ssh/sshd_config

Once editing this file, simply change ChallengeResponseAuthentication to no and PubkeyAuthentication to yes. These will likely be in different places within the file:

PubkeyAuthentication yes
...
ChallengeResponseAuthentication no

After making the changes, restart ssh: sudo systemctl restart sshd. You can now exit the session and try to reconnect.

If you’re currently unable to connect through ssh because you aren't able to authenticate with your YubiKey, you can use our LISH Console to login to your server and make the changes discussed above. You can learn more about LISH by reading our guide Using the Linode Shell (Lish)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct