1. 程式人生 > >macbook上ssh localhost免密登入

macbook上ssh localhost免密登入

第一步:ssh-keygen -t rsa 
       然後提示輸入直接按回車就好
第二步:cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
第三步:chmod og-wx ~/.ssh/authorized_keys
第四步:chmod 750 $HOME 
搞定!