zoukankan      html  css  js  c++  java
  • Linux ssh 免密

    生成rsa

    ssh-keygen -t rsa 

    将生成的秘钥发送到其他服务器

    ssh-copy-id hadoop1

    执行结果

    [root@hadoop2 ~]# ssh-copy-id hadoop1
    /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
    The authenticity of host 'hadoop1 (192.168.52.101)' can't be established.
    ECDSA key fingerprint is SHA256:tmlEUTX/zC4HLJENTTO6X2Kx0ELMHn95iT9c8foctvI.
    ECDSA key fingerprint is MD5:1a:04:b6:95:d7:2e:ec:a0:50:04:46:9d:2a:73:77:0e.
    Are you sure you want to continue connecting (yes/no)? yes
    /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
    /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
    root@hadoop1's password: 
    
    Number of key(s) added: 1
    
    Now try logging into the machine, with:   "ssh 'hadoop1'"
    and check to make sure that only the key(s) you wanted were added.

    将authorized_keys发送到其他服务器的方法:

    定位到authorized_keys 存放位置

    cd /root/.ssh

    scp authorized_keys hadoop1:$PWD

    执行结果:

    [root@hadoop1 ~]# cd /root/.ssh
    [root@hadoop1 .ssh]# scp authorized_keys hadoop1:$PWD
    root@hadoop1's password: 
    authorized_keys  
  • 相关阅读:
    oracle依据注释查询表信息
    oracle中建表后添加注释
    第四章:联机分析处理olap
    第三节:数据仓库与ODS
    第二节:数据仓库系统的体系结构
    第一节:数据库与数据仓库
    视图
    oracle中生成随机数的方法
    oracle两表中的两列进行模糊匹配的方法
    Oracle基本操作
  • 原文地址:https://www.cnblogs.com/mrma/p/12845085.html
Copyright © 2011-2022 走看看