I'm wondering how I can log in to SSH under this condition.
First,
$ssh-add-K.ssh/id_rsa
registered key for SSH connection by running the
This allowed us to successfully connect to the SSH server.
However, if you run ssh-add-L after restarting your PC/Mac,
takayamanorikonoiMac:~takayamanoriko$ssh-add-L
The agent has no identities.
Nothing was registered
Nevertheless, the ssh command was still able to connect.
(In addition, since SSH is connected to Bitbucket, I think there will be no misconfiguration on the server side.)
I would like you to tell me, but why do you think I can log in?
Also, is the key still registered in the result of The agent has no identities?
I would appreciate it if you could let me know if there are any other points that I should look into or misunderstand.
Thank you for your cooperation
ssh openssh
-identity file
Specifies a file to read identity during public key authentication.The default is ~/.ssh/identity in the user ディレクトs home directory for Protocol 1, ~/.ssh/id_dsa for Protocol 2, ~/.ssh/id_ecdsa, ~/.ssh/id_ed25519 and ~/.ssh/id_rsa. You can also specify the identity file on a per-host basis, depending on the configuration file.You can also specify multiple -i options.If the certificate is not explicitly specified in the CertificateFile configuration item, ssh also tries to read the certificate from the filename with -cert.pub at the end.
In short, the $HOME/.ssh/id_rsa
file is the private key to use by default, so you don't have to specify it (without adding it in ssh-add
).
© 2024 OneMinuteCode. All rights reserved.