Too many public keys

Damien Miller djm at
Tue Apr 9 12:55:00 EST 2013

On Sun, 7 Apr 2013, James Cloos wrote:

> >>>>> "DM" == Damien Miller <djm at> writes:
> >> The problem is when connecting to a site which does not provide an oob
> >> way to install an authorized_keys file.  Ssh(1) sends each key and the
> >> remote sshd(8) drops the connection before one can enter one's passwd.
> DM> ssh -i none user at host
> That doesn't work here:
> :; ssh -i none
> Warning: Identity file none not accessible: No such file or directory.
> Received disconnect from 2: Too many authentication failures for cloos
> ssh skips none because it is not found and then tries everything known
> to the agent

Sorry, if you are using the agent then

ssh -oIdentityFile=none -oIdentitiesOnly=yes user at host

Seriously, if you have a ton of keys in the agent then it makes every
sense to limit what you present. In practice, it means filling out

Host a
	IdentityFile ~/.ssh/id_host_a
Host b
	IdentityFile ~/.ssh/id_host_b
Host c d e f g
	IdentityFile ~/.ssh/id_host_lots
Host z
	IdentityFile none
Host *
	IdentitiesOnly yes


More information about the openssh-unix-dev mailing list