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
Posted by Thomas Eisenbarth to makandra dev (2011-07-06 09:03)