Ubuntu 系统的默认用户名是 ubuntu,并在安装过程中默认不设置 root 帐户和密码。您如有需要,可在设置中开启允许 root 用户登录。具体操作步骤如下:
sudo passwd root passwd: password updated successfully sshd_config 配置文件。 sudo vi /etc/ssh/sshd_config #Authentication,将 PermitRootLogin 参数修改为 yes。如果 PermitRootLogin 参数被注释,请去掉首行的注释符号(#)。如下图所示: 
#Authentication,将 PasswordAuthentication 参数修改为 yes。如下图所示:
说明
若
sshd_config配置文件中无此配置项,则添加PasswordAuthentication yes项即可。

sudo service ssh restart
以上是腾讯云的官方文档。这里少强调了一个地方,就是PasswordAuthentication yes,这里默认是(#PasswordAuthentication prohit password)需要去掉注释# 然后改成 PasswordAuthentication yes

这样就可以远程ssh登录了。