Passwordless SSH login

Karl Auer kauer at biplane.com.au
Thu Feb 11 05:54:52 UTC 2021


On Wed, 2021-02-10 at 21:18 -0800, Bob wrote:
> I think this has gotten off on a tangent.
> 
> What I want is to prevent someone logging in the the computer using a
> password.
> 
> I only want to allow a login using an rsa key.

To you mean allow an ssh login only with a public key, or allow ANY
login only with a key?

The latter is a whole 'nother thing.

If you are only talking about ssh logins, then on the system you are
connecting TO:
- turn off PasswordAuthentication in the sshd config
- turn off ChallengeResponseAuthentication in the sshd config
- restart sshd
- done

If doing those things does not work then:
- you did not do them correctly
- you did not do them at all
- you did them on the wrong server

You will know when it works because "ssh random at server" will say
"Access denied (publickey)" or it will just disconnect, but it will not
request a password.

Note that if you use your own account for the test and your key has a
passphrase you WILL still be asked for the passphrase. If it has not
worked you will get "random at server's password:".

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer

GPG fingerprint: 2561 E9EC D868 E73C 8AF1 49CF EE50 4B1D CCA1 5170
Old fingerprint: 8D08 9CAA 649A AFEF E862 062A 2E97 42D4 A2A0 616D







More information about the ubuntu-users mailing list