zoukankan      html  css  js  c++  java
  • 通过ssh登录centos7

    1.执行指令

    ssh-keygen -t rsa
    

    使用rsa协议生成公匙和私匙
    2.三次确认,使用默认存放位置,密码为空,确认密码为空

    [root@iZbp1gg50ddqbgxf1jpqwwZ ~]# ssh-keygen -t rsa
    Generating public/private rsa key pair.
    Enter file in which to save the key (/root/.ssh/id_rsa):
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in /root/.ssh/id_rsa.
    Your public key has been saved in /root/.ssh/id_rsa.pub.
    The key fingerprint is:
    SHA256:291afX8QKD/Ys+Ji/tbtKyC/lZXfSNoqmV6IVlFiy/U root@iZbp1gg50ddqbgxf1jpqwwZ
    The key's randomart image is:
    +---[RSA 2048]----+
    |          o o    |
    |         o = .   |
    |          +  .E  |
    |          ... .. |
    |        S .=  +. |
    |        .=oo=B.+.|
    |        +oo=*==.=|
    |       .o Bo++. +|
    |       o.*=+ooo.o|
    +----[SHA256]-----+
    
    

    3./root/.ssh 公匙和私匙存放位置

    [root@iZbp1gg50ddqbgxf1jpqwwZ .ssh]# ll
    total 8
    -rw------- 1 root root    0 Jan 16 21:37 authorized_keys
    -rw------- 1 root root 1679 Jan 20 15:40 id_rsa
    -rw-r--r-- 1 root root  410 Jan 20 15:40 id_rsa.pub
    
    

    4.开放公匙登录服务器

    cat id_rsa.pub >> authorized_keys
    
  • 相关阅读:
    drf框架 APView的请求生命周期
    web API接口、restful规范
    vue项目安装插件配置
    vue项目、路由
    day67
    vue组件
    day66
    HDFS(Hadoop Distribute File System)
    JVM运行优化学习笔记
    ELK(检索)
  • 原文地址:https://www.cnblogs.com/jenkins/p/12228559.html
Copyright © 2011-2022 走看看