LINUX | 谷歌云开启SSH及设置root密码
转载https://www.vediotalk.com/archives/606
sudo -i
passwd
方法1
nano /etc/ssh/sshd_config
PermitRootLogin yes
PasswordAuthentication yes //默认为no,改为yes开启密码登陆
service sshd restart
方法二
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系统,输入以下两条命令
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
reboot