Force SSH client to use password authentication instead of public key

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 Almost 13 years ago