WinSCP远程连接root用户

来源:互联网 发布:mac os 文本编辑命令 编辑:程序博客网 时间:2024/06/03 19:00
ubuntu 服务器默认的root账号是没有激活的,需要用初装的用户账号给root设置管理密码:user@ubuntu12:~$ sudo passwd root //用sudo修改root帐户Password: //输入密码Enter new UNIX password: //提示输入新的root帐户密码Retype new UNIX password:  //再输入一次确认密码修改成功之后你就可以使用root账号了,可以使用su root 命令切换到root。但是碰到过一次情况,就是修改之后,直接用root账号无法登陆远程终端,这是还需要修改ssh配置文件:/etc/ssh/sshd_config 修改该配置文件:# Authentication:LoginGraceTime 120PermitRootLogin without-passwordStrictModes yes将 PermitRootLogin without-password  修改为 PermitRootLogin yes,如下:# Authentication:LoginGraceTime 120PermitRootLogin yesStrictModes yes可以成功登陆了。
0 0
原创粉丝点击