Ubuntu 14 使用 root 登录 vps

今天再买了个 BudgetVM 的 vps,镜像使用 Ubuntu 14.04,创建后总是无法使用 root 进行 ssh 登录,随后发了 ticket 询问得到回复:

I see you have Ubuntu. Ubuntu 14 has disabled root login via SSH.

You will either need to enable the root login via SSH by directly editing /etc/ssh/sshd_config or creating an additional account with sudo privileges. You may do this by using the serial console function of your client area.

A "one liner" to complete this via command line is:

sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/g' /etc/ssh/sshd_config

Make sure you restart SSH services after.

他们镜像的 Ubuntu 14 禁止了 root 登录,在 /etc/ssh/sshd_config 修改后重启即可。

PermitRootLogin yes