ssh 免密钥登陆 使用私钥

    技术2025-02-02  6

    服务器运行 ssh-keygen -t rsa ls -l ~/.ssh/ id_rsa 私钥 id_rsa.pub 公钥 拷贝id_rsa到本地报错修改权限 Permissions 0644 for 'id_rsa' are too open. chmod 400 id_rsa 成功登陆 ssh -i id_rsa -p 端口 -l root ip地址

    参考:

    SSH 使用密钥登录并禁止口令登录实践SSH Key: “Permissions 0644 for ‘id_rsa.pub’ are too open.” on mac
    Processed: 0.009, SQL: 9