SSH: “Bad passphrase” after generation of public key

泄露秘密 提交于 2019-12-20 17:28:57

问题


When I execute these commands (setting a passphrase, after the first)...

$ ssh-keygen -t dsa
$ chmod 600 my_key
$ chmod 600 my_key.pub

...and then, to test the passphrase...

$ ssh-add my_key.pub

...I keep getting:

Bad passphrase, try again for my_key.pub:
Bad passphrase, try again for my_key.pub:
Bad passphrase, try again for my_key.pub:
Bad passphrase, try again for my_key.pub:
...

What am I doing wrong?


回答1:


You're trying to add public key to the agent, that one isn't pass-protected, the private one is. Try adding your private key and it should work.



来源:https://stackoverflow.com/questions/20617660/ssh-bad-passphrase-after-generation-of-public-key

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!