How to force ssh client to authenticate using password on Linux?
Posted on In QAssh client can use many authentication methods like password, keys. On a server, I set password-less log in with private/public key. Now, I want to try whether the new password is set correctly by log on using ssh. By default, the key-based authentication method is used again.
How to force ssh client to authenticate using password on Linux?
You can use this command:
ssh -o PreferredAuthentications=password username@host
Here, PreferredAuthentications=password
make ssh
to use password
as the authentication method.
The methods available for authentication are: GSSAPI-based
authentication, host-based authentication, public key authentication,
challenge-response authentication, and password authentication.
Authentication methods are tried in the order specified above, though
protocol 2 has a configuration option to change the default order:
PreferredAuthentications
More about ssh authentications, please check ssh
manual.