Loading...

Knowledge Base

Common SSH Issues

Secure Shell (SSH) provides secure access to the shell environment on your account. Below we've outlined some common issues you may encounter when using SSH, and how you can possibly resolve those issues.

Common SSH Issues

"Too many authentication failures for [user]."

This message indicates that your login attempt was dropped after attempts to authenticate the session. You would likely see this due to having multiple identity keys (also known as private keys or DSA/RSA keys) in your .ssh directory.

The SSH client will attempt to log in using each identity (private key) and then prompt for password authentication. However, the connection is dropped after a set number of bad login attempts (as specified by your server's security settings).

The error message "Too many authentication failures for [user]" is displayed for this issue when using SSH in verbose (with the -v flag) mode. You may see instead the error message "Connection reset by peer" if you are not in verbose mode.

Solutions for this issue include:

  1. Command line solution: -i flag

    The -i flag can be used to specify the private key file to use for authentication. Defaults are:

    • $HOME/.ssh/identity (for protocol version 1)

    • $HOME/.ssh/id_rsa and $HOME/.ssh/id_dsa (for protocol version 2)

  2. Command line solution: -o PubkeyAuthentication=no

    You can disable "Public Key Authentication" at the command line using the optional argument:

    -o PubkeyAuthentication=no

    This forces non-key authentication. The full command with all arguments would look like this:

    $ ssh -p 2222 -o PubkeyAuthentication=no[email protected]

    Replace the username with your own login.

  3. Configuration file solution: IdentitiesOnly yes

    You may consider adding the following to your .ssh/config file:

    IdentitiesOnly yes

    This will force non-key authentication, effectively doing the same thing for all logins as the "PubkeyAuthentication=no flag does at the command line.

Did you find this article helpful?

 
* Your feedback is too short

Loading...