Sign up Log in
n/chit-chat · 2024-11-19 · 446 views
u/Anonymous6Silver
n/chit-chatu/Anonymous6 · 2024-11-19

谷歌VPS添加root密码全过程

切换root权限
sudo -i

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

设置Root登陆密码
passwd root
重启sshd服务
service sshd restart
利用reboot重启VM实例即可.

0
2
Log into join the discussion.
海外原生IP VPS,稳定访问全球网络

还在为IP不纯、平台风控、频繁验证而烦恼? 丽萨主机海外原生IP VPS,双ISP住宅IP,覆盖美国、香港、日本、新加坡、台湾、德国、越南、英国等热门地区,适合跨境电商、社媒运营、AI工具、流媒体及海外业务使用。

lisahost.com Learn more

2 replies

Sort order
  1. lusky Honorary Member Platinum Sage 2024-11-19

    [[13],[1]]

    0
  2. lusky Honorary Member Platinum Sage 2024-11-19

    不是科学发日常,下次注意哦

    0