• centos7-ssh免秘钥登录


    实验环境:

     主机1:controller    ip:192.168.1.10

       

     主机2:compute      ip:192.168.2.10

     controller主机执行ssh-keygen -t rsa生成秘钥

    查看秘钥是否生成 

    compute主机执行ssh-keygen -t rsa生成秘钥

     controller主机给compute主机分发公钥:scp .ssh/id_rsa.pub 192.168.1.20:/root/.ssh/authorized_keys

    controller主机执行:cp .ssh/id_rsa.pub .ssh/authorized_keys   

    两台主机均要修改authorized_keys文件权限为600  

    chmod 600 .ssh/authorized_keys

    controller主机免密码登录compute主机

  • 相关阅读:
    YAML序列样式
    YAML块标量头
    YAML字符流
    YAML语法字符
    YAML流程
    YAML集合和结构
    YAML缩进和分离
    YAML简介
    Git工作流程
    Git使用前配置
  • 原文地址:https://www.cnblogs.com/liuhui-xzz/p/10147437.html
Copyright © 2020-2023  润新知