1. Create a user account on SystemB.
2. Run "ssh-keygen -t rsa" on SystemA.
When it prompts for any input, use default values.
3. Step 2 automatically creates 2 files, id_rsa and id_rsa.pub, in .ssh directory of the account.
4. Copy id_rsa.pub as authorized_keys to the newly created user account's .ssh directory on SystemB.
.ssh directory exists in the home directory of the user.
5.Login the host
chmod 755 .ssh
chmod 755 CS2K
2. Run "ssh-keygen -t rsa" on SystemA.
When it prompts for any input, use default values.
3. Step 2 automatically creates 2 files, id_rsa and id_rsa.pub, in .ssh directory of the account.
4. Copy id_rsa.pub as authorized_keys to the newly created user account's .ssh directory on SystemB.
.ssh directory exists in the home directory of the user.
5.Login the host
chmod 755 .ssh
chmod 755 CS2K
转载于:https://blog.51cto.com/susanpray/190782