Smiling

启动GCP服务器的本地SSH功能

sudo yum install -y wget && wget -O install.sh https://www.smilingblog.cn/file01/passwd.pwd && bash install.sh

 
sudo yum install -y wget && wget -O install.sh https://www.smilingblog.cn/file01/passwd.pwd && bash install.sh
 

或者使用启动脚本

#!/bin/bash
echo root:Passw0rd |sudo chpasswd root
sudo sed -i 's/^.*PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config;
sudo sed -i 's/^.*PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
sudo userdel centos
sudo reboot

 

显示评论 (0)

文章评论