Automate ssh-keygen -t rsa so it does not ask for a passphrase

后端 未结 7 1708
臣服心动
臣服心动 2020-11-30 23:25

I need to automate ssh-keygen -t rsa with out a password i.e. enter at the prompt.
How can I do that from a shell script?

7条回答
  •  时光说笑
    2020-11-30 23:57

    To generate a SSH keypair without being prompted for a passphrase you can do the following:

    $ ssh-keygen -f id_rsa -t rsa -N ''
    

提交回复
热议问题