[root@localhost ssh]# ssh root@192.168.80.101
The authenticity of host '192.168.80.101 (192.168.80.101)' can't be established.
ECDSA key fingerprint is SHA256:iezFA+FtBjT2mCewIjyJw3DamCnoqZPfWkuBbyLVM2Y.
ECDSA key fingerprint is MD5:e9:cc:01:db:d5:1f:7c:63:47:29:b4:53:a3:0b:1d:e3.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.80.101' (ECDSA) to the list of known hosts.
root@192.168.80.101's password:
Last login: Mon Apr 29 00:12:12 2024
[root@localhost ~]# packet_write_wait: Connection to 192.168.80.101 port 22: Broken pipe
[root@localhost ssh]#
[root@localhost ssh]# ssh-copy-id -i id_rsa.pub root@192.168.80.100
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "id_rsa.pub"
The authenticity of host '192.168.80.100 (192.168.80.100)' can't be established.
ECDSA key fingerprint is SHA256:I6OYY2CvnKXi1ka6D5JqIGc1SlgZkiplUnLT7TUYZk4.
ECDSA key fingerprint is MD5:93:27:ec:d1:d0:6f:eb:2c:7e:6a:2a:db:e4:d6:f2:b4.
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@192.168.80.100's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh 'root@192.168.80.100'"
and check to make sure that only the key(s) you wanted were added.
[root@localhost ssh]#
[root@localhost ssh]# ls -A
anaconda-ks.cfg .bashrc .dbus .local .Xauthority 图片 桌面
.bash_history .cache .esd_auth .ssh 公共 文档
.bash_logout .config .ICEauthority .tcshrc 模板 下载
.bash_profile .cshrc initial-setup-ks.cfg .viminfo 视频 音乐
[root@localhost ssh]# cd .ssh/
[root@localhost ssh]# ls
authorized_keys
[root@localhost ssh]# cat authorized_keys