There may come a time when you want to confirm the validity of the SSH keys you are using or about to use.

This might help with troubleshooting or even for an on-the-fly security audit.

You can check all available keys on the machine with the following command:

for key in ~/.ssh/id_*; do ssh-keygen -l -f "${key}"; done | uniq

 

You can also just go down to the .ssh folder with

cd .ssh && ls -al

or if you are on a different path:

cd ~/.ssh && ls -al

Now run:

ssh-keygen -l -f $keyname ssh-keygen -l -f $keyname.pub

この回答は役に立ちましたか? 0 好評の記事 (0 投票)