创建ssh密钥,但在命令行提供密码

时间:2012-11-17 02:31:16

标签: bash shell ssh

生成SSH密钥的shell命令是什么,但是提供密码作为命令的一部分而不是标准输入以自动执行此操作?

例如(伪代码):

ssh-keygen -f ./id_rsa -t rsa --passphrase=my-secret-here

感谢。

1 个答案:

答案 0 :(得分:2)

来自man ssh-keygen

    -N new_passphrase
         Provides the new passphrase.