Environment:
aix:192.168.1.235
centos:192.168.1.121
First, modify the configuration file
Configuration file path:/etc/ssh/sshd_config
Modify the following content:
#RSAAuthentication Yes
#PubkeyAuthentication Yes
#AuthorizedKeysFile. Ssh/authorized_keys
Cancel all its comments
Second, generate key pair
Command: Ssh-keygen
Id_rsa id_rsa.pub Two files generated under the ~/.ssh directory
Where Id_rsa.pub is the native public key and needs to be copied to the remote host
Third, copy the key
Command: SCP id_rsa.pub host Ip:~/.ssh/hostname.pub
On AIX: SCP id_rsa.pub 192.168.1.121:~/.ssh/aix.pub
On CentOS: SCP id_rsa.pub 192.168.1.235:~/.ssh/centos.pub
Iv. append the public key into the Authorized_keys file
Create a file under the./ssh Authorized_keys
Append the other public key to the file
On AIX: Touch Authorized_keys
Cat centos.pub > Authorized_keys
On CentOS: Touch Authorized_keys
Cat aix.pub > Authorized_keys
Aix and Linux SSH Trust