LINUX VPS沒有ROOT權限是很難受的事,並且密碼登陸也方便一些。
我的AWS VPS的LINUX版本是UBUNTU 13.10,首先用AWS證書驗證的賬戶登錄,
1、修改ROOT密碼
sudo passwd root
2、sudo chmod 777 /etc/ssh/sshd_config
用完再把權限改回來
3、vi /etc/ssh/sshd_config
PermitRootLogin
這行改為
PermitRootLogin yes
PasswordAuthentication no
上面的no改為yes
————-centos此步不需做—————
UsePAM yes
上面的yes改為no
—————————-
4、重啟AWS VPS,就可以使用root正常登陸了