ssh私钥id_rsa取消密码passphrase

为了私钥的安全,私钥可以设置一个密码。增加密码无疑会提高安全,但很多时候用起来却比较麻烦。
如果突然想取消密码,也是可以的,方法是使用 openssl 重新生成不带密码的私钥,命令如下:
openssl rsa -in ~/.ssh/id_rsa -out ~/.ssh/id_rsa_new
mv ~/.ssh/id_rsa ~/.ssh/id_rsa.backup
mv ~/.ssh/id_rsa_new ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa

你可能感兴趣的:(ssh私钥id_rsa取消密码passphrase)