首先利用Xshell 5使用key密匙登陆。。。密匙登陆用户名是你选择了实例操作系统作为用户名使用
接着
设置或者更改root密码
[ubuntu@ip-172-31-34-97 ~]$ sudo passwd root Changing password for user root. New password: Retype new password:
更改/etc/ssh/sshd_config 配置
sudo vim /etc/ssh/sshd_config find PermitRootLogin change PermitRootLogin yes 去掉注释 find PasswordAuthentication change PasswordAuthentication yes find UsePAM change UsePAM yes
重启ssh 服务
sudo /etc/init.d/ssh restart
最后切换到root用户 修改ubuntu用户的密码
su root
root@ip-172-31-23-73:/home/ubuntu# passwd ubuntu
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
电脑维护,系统安装,软 、硬件维修,电脑配件,零售业务,网站建设,路由器安装设置、 服务器维护,电脑、网络维护,智能手机刷机,安装WIFI 调试!郴州网站建设 小程序搭建 郴州电脑维修
咨询电话:18175576644 扫描二维码。关注公众号,小程序 享受星级服务 |
手机点击二维码关注 |
手机点击打开小程序 |