Force SSH client to use password authentication instead of public key

Updated . Posted . Visible to the public.

To test if you can connect to a host using password authentication and explicitly deny public key authentication:

ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no user@host

This also works for Secure Copy:

scp -o PreferredAuthentications=password -o PubkeyAuthentication=no local.file user@host:/path/to/remote.file
Thomas Eisenbarth
Last edit
Arne Hartherz
License
Source code in this card is licensed under the MIT License.
Posted by Thomas Eisenbarth to makandra dev (2011-07-06 09:03)