假设client 需要连接server端.
server端:
mkdir -p ~/.ssh
chmod 700 ~/.ssh/
touch ~/.ssh/authorized_keys
chmod 644 ~/.ssh/authorized_keys
client端:
ssh-keygen -t rsa 连按3次回车
scp ~/.ssh/id_rsa.pub remote_serve
回到server端:
cat ~/id_rsa.pub >> ~/.ssh/authorized_keys
OK