一、修改ssh配置文件并設(shè)置root密碼
1.首先使用Google Cloud SSH登錄VPS
2.切換到root賬戶
sudo-i
3.編輯ssh配置文件
vim /etc/ssh/sshd_config
4.修改以下內(nèi)容即可
按鍵盤【i】
進(jìn)入編輯,按【Esc】退出編輯,再輸入:wq保存并退出
基本參數(shù):
PermitRootLogin yes #允許root認(rèn)證登錄
PasswordAuthentication yes #允許密碼認(rèn)證
RSAAuthentication yes #秘鑰認(rèn)證
PubkeyAuthentication ye
5.重啟ssh
service sshd restart
6.為root賬戶設(shè)置密碼
passwd
輸入密碼
輸入密碼的時(shí)候不會顯示出來,所以直接輸入密碼,然后回車,再然后重復(fù)輸入密碼回車
確認(rèn)密碼再輸入一次
設(shè)置成功
然后就可以用Putty,SecureCRT等軟件遠(yuǎn)程訪問了。