【问题标题】:SSH Key generation without pressing enter无需按回车即可生成 SSH 密钥
【发布时间】:2020-11-02 22:17:59
【问题描述】:

我正在尝试编写一个用于生成 ssh 密钥的 Bash 脚本。我在要求免密码时遇到按 Enter 的问题。如何在不按 Enter 的情况下使其工作。

点击下面的链接,它会要求按回车键。

ssh installation normal process

【问题讨论】:

    标签: bash shell hadoop ssh automation


    【解决方案1】:

    试试:

       ssh-keygen -f ~/.ssh/id_rsa -P ""
    

    既不会要求目标文件也不会要求密码

    【讨论】:

      【解决方案2】:

      ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa -m pem <<< y更好; duplicate question

      【讨论】:

        猜你喜欢
        • 2014-12-30
        • 1970-01-01
        • 1970-01-01
        • 2013-03-17
        • 2021-08-11
        • 2019-06-11
        • 2020-08-06
        • 2021-09-10
        • 1970-01-01
        相关资源
        最近更新 更多