#759628 openssh-client: ssh ignores non-existent private key

Package:
openssh-client
Source:
openssh
Description:
secure shell (SSH) client, for secure access to remote machines
Submitter:
Ian Zimmerman
Date:
2014-10-20 20:51:18 UTC
Severity:
normal
#759628#5
Date:
2014-08-29 03:00:11 UTC
From:
To:
I found that the following command

 ssh -i ~/.ssh/foo me@some.other.host

succeeds (with a warning) if ~/.ssh/foo doesn't exist or is otherwise
inaccessible, as long as the default private key can be used to connect
as specified.  I don't know if this can be abused, but I had a script
that kept "working" for months after I deleted the private key specified
because my default key happened to enable access.

IMO this should fail and not just warn.

#759628#10
Date:
2014-08-29 09:21:11 UTC
From:
To:
2014-08-28 20:00:11 Ian Zimmerman:

Please try with -o IdentitiesOnly yes
That should keep ssh from trying other keys, for example from the agent.


Greetings
Timo

#759628#15
Date:
2014-10-20 20:15:20 UTC
From:
To:
Ian> otherwise inaccessible, as long as the default private key can be
Ian> used to connect

Timo> Please try with -o IdentitiesOnly yes

I tried that, but the behavior is the same: warning, then it connects.