Xshell使用root账户连接Deepin(Ubuntu)

版权声明:本文为博主阿甘(Gane_Cheng)原创文章,欢迎转载,传播知识,请留言告知并注明出处,方便文章有误改正之后能找到原文。个人之言,请抱着怀疑的态度参考! https://blog.csdn.net/Gane_Cheng/article/details/52913354

转载请注明出处:

http://blog.csdn.net/gane_cheng/article/details/52913354

http://www.ganecheng.tech/blog/52913354.html (浏览效果更好)

概念介绍

Xshell 是一个安全终端模拟软件,可以进行远程登录。

Xshell 的主要目的是在 Windows 环境下登录 Linux 终端进行操作,非常方便。

root 账户是 Linux 权限最高的用户。

很多操作切换到 root 账户下很方便,而且没有各种权限问题。

Ubuntu 是一个以桌面应用为主的 Linux 操作系统,是最受欢迎的桌面 Linux 系统。

Deepin 就是 Ubuntu 的衍生版本,更加美观的 GUI,内置了重新设计的常用软件,适合日常使用。

操作步骤

① 激活root账户

sudo passwd root

输入密码之后,切换到 root 账户。

su root

输入密码之后就可以进入 root 账户了。

② 安装 SSH 服务

apt-get install ssh

安装完成之后,可以使用命令启动 SSH 服务。

有两种方式可以启动,下面两种方式任选其一。

service sshd start

/etc/init.d/sshd start

③ 开启 SSH 的 root 账户远程登录

用 Xshell root 连接时,显示 SSH 服务器拒绝了密码,原因是 sshd 默认设置不允许 root 用户密码远程登录。

现在开启 root 账户远程登录。

vi /etc/ssh/sshd_config

找到

# Authentication:
LoginGraceTime 120
PermitRootLogin prohibit-password
StrictModes yes

改为

# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes

此时重启 SSH 服务

service sshd restart

/etc/init.d/sshd restart

当然,重启电脑更好。

④ Enjoy

尽情享受超级用户权限吧。

Xshell 登录后的效果是这样的。

Xshell 4 (Build 0131)
Copyright (c) 2002-2014 NetSarang Computer, Inc. All rights reserved.

Type `help' to learn how to use Xshell prompt.
Xshell:\> 

Connecting to 192.168.0.31:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.


The programs included with the Deepin GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Deepin GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Oct 24 17:50:48 2016 from 192.168.0.110
root@hadoop-1:~# ls
root@hadoop-1:~# 

参考文献

http://blog.csdn.net/u013366098/article/details/50542418

猜你喜欢

转载自blog.csdn.net/Gane_Cheng/article/details/52913354