朱纯树博客
VPS测评推荐网站
cloudacead cloudacead

谷歌云ssh开启root密码登录

修改配置
1.先选择从浏览器打开ssh连接服务器
连接登录成功后,输入以下命令

sudo -i  #切换到root
passwd   #修改密码

然后会要求输入新密码,然后再重复一次密码,输入密码的时候不会显示出来,所以直接输入密码,然后回车,再然后重复输入密码回车。
修改root密码完成

2.接着修改SSH配置文件/etc/ssh/sshd_config

vi /etc/ssh/sshd_config #编辑文件

找到以下内容并修改

PermitRootLogin yes //默认为no,需要开启root用户访问改为yes
PasswordAuthentication yes //默认为no,改为yes开启密码登陆

修改完成后,再下按 esc 键,然后再输入

:wq   #保存并退出

3.最后重启下服务器即可

reboot    #重启服务器

修改的时候把输入法切换到英文输入、大小写一定要看清楚再输入、移动光标不要按方向键;“a”是进入编辑模式,“ESC”键是退出编辑模式;非编辑模式下“k”是把光标向上移动、“j”向下、“h”向左、“l”向右;“x”是非编辑模式删除键;编辑模式下一边按着“Shift”上档键一边按着小键盘上的“-”减号键才会出现“_”下划线;修改完成以后在非编辑模式下输入“:wq”回车保存退出,修改错误输入“:q!”回车不保存退出,然后在运行刚才的修改命令重新修改。

赞(0) 打赏
未经允许不得转载:VPS测评推荐网站 - 朱纯树博客 » 谷歌云ssh开启root密码登录

评论 22

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #30
  2. #29

    This is a great tip particularly to those new to the blogosphere.
    Short but very accurate information… Thanks for sharing this one.
    A must read post!

    tinyurl.com4个月前 (08-15)回复
  3. #28

    Terrific work! This is the kind of info that are meant to be shared across the web.
    Shame on the seek engines for no longer positioning this put up higher!

    Come on over and talk over with my website . Thanks =)

    tinyurl.com4个月前 (08-14)回复
  4. #27

    If you are going for most excellent contents like me, only go
    to see this web site everyday for the reason that it provides feature contents, thanks

  5. #26

    This piece of writing will assist the internet users
    for setting up new website or even a blog from start to end.

  6. #25

    We stumbled over here different website and thought I might check things out.
    I like what I see so now i am following you.
    Look forward to checking out your web page yet again.

    http://tinyurl.com4个月前 (08-08)回复
  7. #24

    Marvelous, what a webpage it is! This webpage provides useful
    facts to us, keep it up.