Pivotal Knowledge Base

Follow

SSH Error: Too many authentication failures

Environment

Product Version
 Pivotal Cloud Foundry® (PCF)  1.6.x and later

Symptom

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

Error

You will receive an error like the following if this issue is effecting 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'

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

 

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

 

 

 

 

 

 

 

Comments

Powered by Zendesk