CentOS7系列--2.2CentOS7中配置SSH服务 (2)

clip_image006

3.2. 客户机复制服务器的密钥,并应用服务器的密钥登录服务器

[root@server2 ~]# mkdir ~/.ssh

[root@server2 ~]# chmod 700 ~/.ssh

[root@server2 ~]# scp root@192.168.1.101:/root/.ssh/id_rsa ~/.ssh/

The authenticity of host \'192.168.1.101 (192.168.1.101)\' can\'t be established.

ECDSA key fingerprint is SHA256:lgN0eOtdLR2eqHh+fabe54DGpV08ZiWo9oWVS60aGzw.

ECDSA key fingerprint is MD5:28:c0:cf:21:35:29:3d:23:d3:62:ca:0e:82:7a:4b:af.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added \'192.168.1.101\' (ECDSA) to the list of known hosts.

root@192.168.1.101\'s password:

id_rsa 100% 1679 79.8KB/s 00:00

[root@server2 ~]# ssh -i ~/.ssh/id_rsa root@192.168.1.101

Last login: Sat Oct 28 12:23:00 2017 from 192.168.1.100

clip_image008

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zzgzzj.html