1.ssh-keygen -t rsa 2. cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys 3. chmod og-wx ~/.ssh/authorized_keys 4. chmod 750 $HOME
注意第4步,如果沒有第4步會報錯:
Permission denied (publickey,password,keyboard-interactive).
1.ssh-keygen -t rsa 2. cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys 3. chmod og-wx ~/.ssh/authorized_keys 4. chmod 750 $HOME
注意第4步,如果沒有第4步會報錯:
Permission denied (publickey,password,keyboard-interactive).
https://stackoverflow.com/questions/419163/what-does-if-name-main-do