https://github.com/BlueSkyXN/ChangeSource/blob/master/oraclessh.sh
代码
#!/bin/bash
echo root:password12345678 |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 service sshd restart
使用方法
直接 创建的时候 就能塞到初始脚本里面运行
或者自己运行
wget -O oraclessh.sh https://raw.githubusercontent.com/BlueSkyXN/ChangeSource/master/oraclessh.sh && chmod +x oraclessh.sh && ./oraclessh.sh
Comments NOTHING