Press "Enter" to skip to content

Lightsail亚马逊VPS用root帐户登录

0

开通的时候,选择启动脚本,并填写下面信息

echo root:mima223 |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 reboot

然后就可以用root帐户登录了,密码默认是mima223,注意修改密码。在上面脚本中修改mima223可以自定义成自己要设置的密码。

如果已经开通的机器需要下载SSH 密钥对,通过PuTTYgen软件(下载地址https://www.puttygen.com/)进行转换,详情见https://www.jianshu.com/p/ab5655fd5cc9

通过centos账号进入后,分别运行以下命令创建root账号密码和开启登录

echo root:mima223 |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 reboot


yum -y install wget

BRR安装
wget -N --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh && chmod +x bbr.sh && bash bbr.sh

wget --no-check-certificate -O shadowsocks-all.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-all.sh
chmod +x shadowsocks-all.sh
./shadowsocks-all.sh 2>&1 | tee shadowsocks-all.log

卸载
./shadowsocks-all.sh uninstall

其他脚本
wget -q -N --no-check-certificate https://raw.githubusercontent.com/FunctionClub/SSR-Bash-Python/master/install.sh && bash install.sh

发表评论