centos 秘钥登陆配置

admin5年前IT技术1904

 准备: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

 

相关文章

MYSQL带存储过程备份命令

命令中要加-R mysqldump -u root -p -R 数据库名称 > 备份文件名.sql...

codex 用于amazon主图与详情A+设计得skill

通过聊天让codex安装 https://github.com/RongjieTang/rongjie-amazon-design上传一张主题与你喜欢得设计风格的A+详情页图片或者主图图片告...

批量修改文件后缀名

新建***.bat在里面写入ren *.* *.gif运行***.bat...

二维码生成导航

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

ubuntu 远程连接 22 端口

安装OpenSSHUbuntu缺省没有安装SSH Server,使用以下命令安装:sudo apt-get install openssh-server openssh-client不过Ubuntu缺...

发表评论    

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