• linux 免密码登录


    linux 免密码登录 配置

    test 为本地linux

     192.168.1.70 为远程linux

    [root@test:/home/root]$ssh-keygen
    Generating public/private rsa key pair.
    Enter file in which to save the key (/home/root/.ssh/id_rsa):
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in /home/root/.ssh/id_rsa.
    Your public key has been saved in /home/root/.ssh/id_rsa.pub.
    The key fingerprint is:
    44:xx:30:xx:xx:76:4b:3a:82:fc:xx:0b:bf:xx:xx:fb root@test
    The key's randomart image is:
    +--[ RSA 2048]----+
    | +.. |
    | + = |
    | o + = |
    | . . o * . |
    | o . = S |
    | . o.+ . |
    | . +o |
    | . +. |
    | oE. |
    +-----------------+
    [root@test:/home/root]$ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.1.70
    The authenticity of host '192.168.1.70 (192.168.1.70)' can't be established.
    RSA key fingerprint is 36:1f:9f:42:fe:7c:bd:34:5b:b0:06:3a:a2:52:b8:ba.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added '192.168.1.70' (RSA) to the list of known hosts.
    root@192.168.1.70's password:
    Permission denied, please try again.
    root@192.168.1.70's password:
    Now try logging into the machine, with "ssh '192.168.1.70'", and check in:

    .ssh/authorized_keys

    to make sure we haven't added extra keys that you weren't expecting.

    [root@test:/home/root]$

  • 相关阅读:
    csp-s模拟 77/78 (达哥专场)
    csp-s 模拟76
    csp-s模拟75 导弹袭击
    反思集
    模拟69/70 考试反思
    抱大腿
    csp-s模拟61 甜圈
    实时记录
    好题思路集汇
    半集训反思 8.28 「路,还是要自己走的」
  • 原文地址:https://www.cnblogs.com/testway/p/7723187.html
Copyright © 2020-2023  润新知