2024年6月14日发(作者:蹇语柳)
[root@node01 ~]# cat /root/.ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQChT+UMdHs0nFFzzWH+4aXdm6qx2vtkmpma+oYF6pabbTcDX1GbZYzqmSyLz7X5O9L8kpgJGXC6jK77jTYIjlHAIzjKSy59rg
CdAOHOrxN68ntXmuJIdnNJVIbcsCBLP+IB21Vyv+OUL20E/vBAGOYDEvA38PI+iddvNLYM7FuJXL8VCspTEbCIMEs+HUa1V8qzNQS/fNxD9tWLxFAiHu73lz3BX2ZED0iSOq9l/sD42epY93NJv4YblAcIcHuSeIa1m0dPpFULMnX/UDKK+ChKua3TM
同理在node02上也能查看到node01的公钥
[root@node02 ~]# cat /root/.ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDPrj8cI8RhKLBgYg8gZ+gj3dpm1/dq3eHNTOyYreiGDSnD+bzO/2biTc/mzSjFBNtbTcwx9/g+Qle60xTZo2l7F4oWNAafMR
O2sY7cc8sIvr3avqVOkSo/mtFj5cFoIq6+f/+DBk3DveJfQ2wfwf+GWsBedgWh19LO/vvufteyP03P8ZdJmbPdaEf8UjusV/pDM26z7lKrLFESwMm/QtRzHqUKU7HVWCgl3Nt8SYivZ7qJODEof83UVceAs5dDOLmgVjubolb5RzN0zQvVT8C1o0zyGtU2/9
在node01上免密登录node02成功
[root@node01 ~]# ssh root@192.168.22.130
Last login: Thu Jan 7 13:14:14 2021 from 192.168.22.1
[root@node02 ~]#
在node02上免密登录node01成功
[root@node02 ~]# ssh root@192.168.22.129
Last login: Thu Jan 7 13:14:22 2021 from 192.168.22.1
[root@node01 ~]#
完成以上操作就可以完成了两台ssh之间的免密登录。
2024年6月14日发(作者:蹇语柳)
[root@node01 ~]# cat /root/.ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQChT+UMdHs0nFFzzWH+4aXdm6qx2vtkmpma+oYF6pabbTcDX1GbZYzqmSyLz7X5O9L8kpgJGXC6jK77jTYIjlHAIzjKSy59rg
CdAOHOrxN68ntXmuJIdnNJVIbcsCBLP+IB21Vyv+OUL20E/vBAGOYDEvA38PI+iddvNLYM7FuJXL8VCspTEbCIMEs+HUa1V8qzNQS/fNxD9tWLxFAiHu73lz3BX2ZED0iSOq9l/sD42epY93NJv4YblAcIcHuSeIa1m0dPpFULMnX/UDKK+ChKua3TM
同理在node02上也能查看到node01的公钥
[root@node02 ~]# cat /root/.ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDPrj8cI8RhKLBgYg8gZ+gj3dpm1/dq3eHNTOyYreiGDSnD+bzO/2biTc/mzSjFBNtbTcwx9/g+Qle60xTZo2l7F4oWNAafMR
O2sY7cc8sIvr3avqVOkSo/mtFj5cFoIq6+f/+DBk3DveJfQ2wfwf+GWsBedgWh19LO/vvufteyP03P8ZdJmbPdaEf8UjusV/pDM26z7lKrLFESwMm/QtRzHqUKU7HVWCgl3Nt8SYivZ7qJODEof83UVceAs5dDOLmgVjubolb5RzN0zQvVT8C1o0zyGtU2/9
在node01上免密登录node02成功
[root@node01 ~]# ssh root@192.168.22.130
Last login: Thu Jan 7 13:14:14 2021 from 192.168.22.1
[root@node02 ~]#
在node02上免密登录node01成功
[root@node02 ~]# ssh root@192.168.22.129
Last login: Thu Jan 7 13:14:22 2021 from 192.168.22.1
[root@node01 ~]#
完成以上操作就可以完成了两台ssh之间的免密登录。