SSH Issues

Secure Shell (SSH) provides secure access to the shell environment on your HostGator account.

This article notes some common issues encountered when using SSH and how to resolve them.

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 login using each identity (private key) and next 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 mode (i.e., with the -v flag). 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

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

    $ ssh -p 2222 -o PubkeyAuthentication=no username@12.34.56.78

    The above command is actually one line, but is word wrapped. Replace the username with your own login.
  3. Configuration file solution: IdentitiesOnly yes

    You may consider adding:

    IdentitiesOnly yes

    to your .ssh/config file. This will force non-key authentification, effectively doing the same thing for all logins as the "PubkeyAuthentication=no flag does at the command line.


Additional Resources

You may read more about SSH here. The following external links are for reference only and will open in a new tab. HostGator cannot offer direct support for the information provided below.