How to force ssh client to authenticate using password on Linux?

ssh 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?

asked Oct 12, 2015 by anonymous

1 Answer

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.

answered Oct 13, 2015 by Eric Z Ma (44,280 points)
edited Jan 20, 2016 by Eric Z Ma

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...