很多人問波仔,為什么谷歌云的SSH連接不上去?那是因?yàn)楣雀柙颇闳羰窍胧褂玫谌降腟SH工具登錄的話,需要進(jìn)行下面的設(shè)置
谷歌云推薦以下工具連接:FinalShell SSH工具
官方下載地址:https://www.hostbuf.com/t/988.html
設(shè)置root密碼
1.先選擇從瀏覽器打開ssh連接服務(wù)器
2.切換到root賬號,輸入代碼
sudo-i
3.設(shè)置root密碼
passwd
然后會要求輸入新密碼,然后再重復(fù)一次密碼,輸入密碼的時(shí)候不會顯示出來,所以直接輸入密碼,然后回車,再然后重復(fù)輸入密碼回車
開啟SSH權(quán)限
CentOS和Debian通用,輸入以下兩條命令
sed-i's/PermitRootLogin no/PermitRootLogin yes/g'/etc/ssh/sshd_config
sed-i's/PasswordAuthentication no/PasswordAuthentication yes/g'/etc/ssh/sshd_config
Ubuntu系統(tǒng),輸入以下兩條命令
sed-i's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g'/etc/ssh/sshd_config
sed-i's/PasswordAuthentication no/PasswordAuthentication yes/g'/etc/ssh/sshd_config
重啟服務(wù)器
reboot