自动化 ssh-keygen -t rsa 所以它不需要密码 [英] Automate ssh-keygen -t rsa so it does not ask for a passphrase
本文介绍了自动化 ssh-keygen -t rsa 所以它不需要密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在没有密码的情况下自动执行 ssh-keygen -t rsa
,即在提示符下输入.
我怎样才能从 shell 脚本中做到这一点?
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?
推荐答案
要在不提示输入密码的情况下生成 SSH 密钥对,您可以执行以下操作:
To generate a SSH keypair without being prompted for a passphrase you can do the following:
$ ssh-keygen -f id_rsa -t rsa -N ''
这篇关于自动化 ssh-keygen -t rsa 所以它不需要密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文