SSH: "no such identity" message for id_rsa
Understand and fix the no such identity messages shown by the SSH client.
When connecting over SSH, no such identity messages appear before the password prompt:
no such identity: /home/user/.ssh/id_rsa: No such file or directory
no such identity: /home/user/.ssh/id_dsa: No such file or directory
no such identity: /home/user/.ssh/id_ecdsa: No such file or directory
user@sshhost's password:
The SSH client looks for default private keys that do not exist, then falls back to password authentication.
Suggested fix
In /etc/ssh/ssh_config, uncomment the line:
IdentityFile ~/.ssh/id_rsa
Notes
- These messages are informational: password login still works.
- For key-based authentication, the private key must exist (
ssh-keygen) and its public key must be installed on the server.