这个问题 Enter file in which to save the key 路径要写绝对路径Á
ssh-keygen [-q] [-b bits] [-t dsa | ecdsa | ed25519 | rsa] [-N new_passphrase] [-C comment] [-f output_keyfile]
类型 dsa | ecdsa | ed25519 | rsa
bit 位长度
默认为SHA256
ssh-keygen -lf ~/.ssh/id_rsa_xuxuehua.pub 2048 SHA256:1kM5dwYyZccRGl7LtIfUq7lgdqb43YyW2hZqsf8sO0w (RSA)
ssh-keygen -E md5 -lf ~/.ssh/id_rsa_xuxuehua.pub 2048 MD5:d2:56:1b:d6:0d:68:9c:55:f6:65:1b:26:6d:30:02:01 (RSA)
ssh-keygen -E sha1 -lf ~/.ssh/id_rsa_xuxuehua.pub 2048 SHA1:O3p96Tu0ZPzB//LPwrTM1YyW6fc (RSA)
-y
outputs the public key:
ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub
清空passphrase
ssh-keygen -t rsa -N '' -f test_rsa_key
ssh-keygen -p -f keyfile
ssh-keygen -p -f keyfile