將 Oracle VPS 修改直接使用 root 登入
passwd root
nano /etc/ssh/sshd_config
PermitRootLogin yes
PasswordAuthentication yes
systemctl restart sshd
或直接裝下面的指令存成sh執行即可
#!/bin/bash
echo root:xxxxxx | sudo chpasswd root
sudo sed -i ‘s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g’ /etc/ssh/sshd_config;
sudo sed -i ‘s/PasswordAuthentication no/PasswordAuthentication yes/g’ /etc/ssh/sshd_config;
sudo systemctl restart sshd