Enter file in which the key is (/root/.ssh/id_rsa): # 提示要暗码的私钥,直接回车Enter new passphrase (empty for no passphrase): # 提示输入加密的暗码,第一次加密显示没有暗码Enter same passphrase again: # 再次输入暗码Your identification has been saved with the new passphrase. # 加密完成
复制代码
验证
# 登录106节点进行验证,输入设置的私钥密码
[root@192 ~]# ssh 192.168.31.106
Enter passphrase for key '/root/.ssh/id_rsa':
Last login: Sun Mar 10 23:29:07 2024 from 192.168.31.105
[root@192 ~]# hostname -I
192.168.31.106
# 登录107节点验证
[root@192 ~]# ssh 192.168.31.107
Enter passphrase for key '/root/.ssh/id_rsa':
Last login: Sun Mar 10 10:03:57 2024 from 192.168.31.161