• WAP手机版 保存到桌面加入收藏设为首页
服务器类

aws在EC2上创建root用户,并使用root用户登录

时间:2016-08-17 09:24:27   作者:哎丫丫   阅读:1535   评论:0
内容摘要:首先利用Xshell5使用key密匙登陆。。。密匙登陆用户名是你选择了实例操作系统作为用户名使用接着设置或者更改root密码[ubuntu@ip-172-31-34-97~]$sudopasswdrootChangingpasswordforuserroot.Newpassword:Retypenewpassword:...

首先利用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


这样就已经可以使用root用户ssh登陆咯。。winscp我来咯。。。
   版权声明,所有转载都有注明出处,本站不负责承担任何法律责往。若有侵权,请联系我。我会及时删除。

电脑维护,系统安装,软 、硬件维修,电脑配件,零售业务,网站建设,路由器安装设置 服务器维护,电脑、网络维护,智能手机刷机,安装WIFI 调试!郴州网站建设 小程序搭建 郴州电脑维修

        咨询电话:18175576644  点击这里给我发消 息
   扫描二维码。关注公众号,小程序
       享受星级服务   

手机点击二维码关注
      


手机点击打开小程序
      


相关评论
免责申明:本站部分资料来源互联网,如果侵犯了您的版权,请作者速来电或QQ与本站联系,我们将第一时间给予以改正或删除。

Copyright © 2020 哎丫丫电脑 All Rights Reserved 
 工信部备案:湘ICP备14010293号-1