AIX和linux SSH互信
環境:
AIX:192.168.1.235
Centos:192.168.1.121
一、修改配置文件
配置文件路徑:/etc/ssh/sshd_config
修改如下內容:
#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile ? ? ?.ssh/authorized_keys
將其注釋全部取消
二、生成密鑰對
命令:ssh-keygen
在~/.ssh目錄下生成了id_rsa ? ? ? ? ? id_rsa.pub兩個文件
其中id_rsa.pub即為本機公鑰,需要將其復制到遠程主機上
三、復制密鑰
命令:scp id_rsa.pub ?主機IP:~/.ssh/hostname.pub
在AIX上:scp id_rsa.pub 192.168.1.121:~/.ssh/aix.pub
在Centos上:scp id_rsa.pub 192.168.1.235:~/.ssh/centos.pub
四、將公鑰追加進authorized_keys文件
在./ssh下創建一個文件authorized_keys
將對方公鑰追加進該文件
AIX上:touch authorized_keys
cat centos.pub > authorized_keys
centos上:touch authorized_keys
cat aix.pub > authorized_keys
轉載于:https://blog.51cto.com/eric1026/1886937
總結
以上是生活随笔為你收集整理的AIX和linux SSH互信的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: XAMPP配置httpd-vhosts.
- 下一篇: Linux 防火墙工具--iptable