Pivotal Knowledge Base


SSH Error, Too many Authentication Failures


Pivotal Cloud Foundry® (PCF) versions 1.6.x and above


You may see issues where you are unable to use the bosh/ssh command to log into a VM.

Error Message:

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-XXX/0 
Unauthorized use is strictly prohibited. All access and activity
is subject to logging and monitoring.
Received disconnect from x.x.x.x 2: Too many authentication failures for bosh_x' or Received disconnect from x.x.x.x 2: Too many authentication failures for vcap'


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.


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

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


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.)

Additional Information

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



Powered by Zendesk