centos 秘钥登陆配置

admin5年前IT技术1736

 准备:2台机器,ip分别为:10.1.80.13     10.1.80.14

目的:通过13 ssh远程访问14.无需输入密码

1、首先在10.1.80.13上生成密钥对。
cd /root/.ssh
ssh-keygen -t rsa


 

2、在root/.ssh目录下生成密钥对 id_rsa和id_rsa.pub
其中id_rsa是私钥,id_rsa.pub是公钥。

3、将公钥直接copy到14的/root/.ssh目录下
scp id_rsa.pub root@10.1.80.14:/root/.ssh

4、将10.1.80.14机器上的id_rsa.pub改名为authorized_keys
cd /root/.ssh
mv id_rsa.pub authorized_keys

5、密钥设置成功。10.1.80.13 ssh访问10.1.80.14无需密码成功
ssh 10.1.80.14

 

相关文章

GA设置排除中国的访问ip流量

GA设置排除中国的访问ip流量

1.视图过滤2.细分受众过滤...

二维码生成导航

http://twoyn.shengmake.nethttp://twalabo.shengmake.nethttp://twyilang.shengmake.nethttp://twyindu.sh...

服务器上使用WMI报 '80041003' Automation 错误的解决办法

服务器上使用WMI报 '80041003' Automation 错误的解决办法

我在网上找的获取cpuid的vb代码,直接在vb中运行正常,我把它打包成dll文件,在asp中引用总是报下面错误 原因:'80041003'  Automation 错误&nbs...

magento2.3.5 安装与优化过程

 bin/magento setup:install --base-url=https://www.mytinely.com/ \--db-host=localhost --db-name=...

shadowsocks_install

执行命令:bash <(curl -sL https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadow...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。