侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

公网秘钥

2023-12-16 星期六 / 0 评论 / 0 点赞 / 130 阅读 / 916 字

远程执行程序或免秘钥远程登录 都需要将公网秘钥发送到目的服务器上。 1 创建秘钥 [root@wzlvm ~]# ssh-keygen 一直按回车即可 2 发送公网秘钥到服务器 在~/.ss

远程执行程序或免秘钥远程登录 都需要将公网秘钥发送到目的服务器上。

1    创建秘钥

    [root@wzlvm ~]# ssh-keygen

   一直按回车即可

2    发送公网秘钥到服务器

    在~/.ssh目录下有刚创建的公网秘钥id_rsa.pub 发送到服务器

[root@wzlvm ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub myvm2

3    免密登录

[root@wzlvm ~]# ssh myvm2Warning: the RSA host key for 'myvm2' differs from the key for the IP address '192.168.125.129'Offending key for IP in /root/.ssh/known_hosts:2Matching host key in /root/.ssh/known_hosts:3Are you sure you want to continue connecting (yes/no)? yesLast login: Wed Oct 19 17:25:03 2016 from 192.168.125.128[root@myvm2 ~]# 

 

广告 广告

评论区