腾讯轻量云root账户ssh登录

控制台

进入主机详细信息

image-20220210164057366

网页一键登录

image-20220210164754694

设置 root 密码

1
sudo passwd root

切换 root 用户

1
su root

支持 root 用户 密码登录

1
2
3
4
5
6
echo PermitRootLogin yes >> /etc/ssh/sshd_config
echo PasswordAuthentication yes >> /etc/ssh/sshd_config
echo UseDNS no >> /etc/ssh/sshd_config # 优化ssh第一次连接速度
echo ClientAliveInterval 30 >> /etc/ssh/sshd_config # 优化ssh登录后连接检测
echo ClientAliveCountMax 86400 >> /etc/ssh/sshd_config # 优化ssh登录后连接检测
service ssh restart

客户端

使用ssh客户端常规登录