#!/bin/bash echo root:123456 |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
新建lightsail的机子,然后输入上方的自定义ssh。开启后就有账号:root;密码:123456
本文作者为senhuo,转载请注明。