SSH error: "Too many authentication failures"
search cancel

SSH error: "Too many authentication failures"

book

Article ID: 293481

calendar_today

Updated On:

Products

Operations Manager

Issue/Introduction

You will receive an error like the following if this issue is affecting you when running the "bosh/ssh" command:

Starting interactive shell on job loggregator_trafficcontroller-partition-###/0 
Unauthorized use is strictly prohibited. All access and activity 
is subject to logging and monitoring. 
Received disconnect from #.#.#.# 2: Too many authentication failures for bosh_x'
or
Received disconnect from #.#.#.# 2: Too many authentication failures for vcap'

Cause

The likely reason that you receive this login failure could be that your ssh clients are automatically trying all your SSH keys when attempting to connect. If there are more than two ssh keys, the server will reject your connection.

Resolution

There are a couple of options available to fix this issue:

  1. If you are using Putty etc. to connect to the Operations (Ops) Manager VM, reduce the number of SSH keys you are connecting. The maximum number of keys you can connect with is two.

    OR

  2. Run the following commands from Ops Manager VM or another machine that has access via ssh to your environment.

    ssh-add -D
    bosh ssh

    (
    ssh-add -D deletes your cached keys in your ssh-agent allowing you to run bosh ssh without error.)

    • If you receive the following message when running the ssh-add commands:
      Could not open a connection to your authentication agent,

      You may need to start your agent by running the following command.

      eval `ssh-agent -s`

      You can find the number of SSH keys you have loaded by running the following command (on OSx/Linux/Unix).

      ssh-add -l/L