<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>服务器安全维护工作室 &#187; 如何禁止root用户直接登录Linux服务器</title>
	<atom:link href="https://www.fuwuqiok.com/tag/%e5%a6%82%e4%bd%95%e7%a6%81%e6%ad%a2root%e7%94%a8%e6%88%b7%e7%9b%b4%e6%8e%a5%e7%99%bb%e5%bd%95linux%e6%9c%8d%e5%8a%a1%e5%99%a8/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fuwuqiok.com</link>
	<description></description>
	<lastBuildDate>Sun, 01 Mar 2020 07:28:40 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.26</generator>
	<item>
		<title>如何禁止root用户直接登录Linux服务器</title>
		<link>https://www.fuwuqiok.com/%e5%a6%82%e4%bd%95%e7%a6%81%e6%ad%a2root%e7%94%a8%e6%88%b7%e7%9b%b4%e6%8e%a5%e7%99%bb%e5%bd%95linux%e6%9c%8d%e5%8a%a1%e5%99%a8/</link>
		<comments>https://www.fuwuqiok.com/%e5%a6%82%e4%bd%95%e7%a6%81%e6%ad%a2root%e7%94%a8%e6%88%b7%e7%9b%b4%e6%8e%a5%e7%99%bb%e5%bd%95linux%e6%9c%8d%e5%8a%a1%e5%99%a8/#comments</comments>
		<pubDate>Wed, 19 Aug 2015 15:05:39 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[服务器迁移]]></category>
		<category><![CDATA[系统安全代维]]></category>
		<category><![CDATA[网站代维]]></category>
		<category><![CDATA[网站防挂马]]></category>
		<category><![CDATA[如何禁止root用户直接登录Linux服务器]]></category>

		<guid isPermaLink="false">https://www.fuwuqiok.com/?p=2598</guid>
		<description><![CDATA[<p>用root用户登录有太多的弊端，因为权限太大，可能一不小心删错了文件，带来严重的后果。禁止root用户登录，从 [&#8230;]</p>
<p><a rel="nofollow" href="https://www.fuwuqiok.com/%e5%a6%82%e4%bd%95%e7%a6%81%e6%ad%a2root%e7%94%a8%e6%88%b7%e7%9b%b4%e6%8e%a5%e7%99%bb%e5%bd%95linux%e6%9c%8d%e5%8a%a1%e5%99%a8/">如何禁止root用户直接登录Linux服务器</a>，首发于<a rel="nofollow" href="https://www.fuwuqiok.com">服务器安全维护工作室</a>。</p>
]]></description>
				<content:encoded><![CDATA[<div class="entry-text clearfix">
<p>用root用户登录有太多的弊端，因为权限太大，可能一不小心删错了文件，带来严重的后果。禁止root用户登录，从某种意义上说，也有利于服务器安全。</p>
<p>出于安全方面的考虑，先增加一个普通权限的用户，再使用su命令切换到root用户。</p>
<p>1. 创建普通权限的用户，用户名为 fuwuqiok.com</p>
<pre># useradd fuwuqiok.com
</pre>
<p>2. 为fuwuqiok.com用户设置密码</p>
<pre># passwd fuwuqiok.com
Changing password for user fuwuqiok.com.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
</pre>
<p>3. 修改sshd_config文件如下</p>
<pre># vi /etc/ssh/sshd_config
#PermitRootLogin yes 
　修改如下
PermitRootLogin no
</pre>
<p>4. 重启ssh服务</p>
<pre># /etc/init.d/sshd restart
Stopping sshd:                                             [  OK  ]
Starting sshd:                                             [  OK  ]
</pre>
<p>登陆方法为用上面创建的普通用户登录。如果想使用root用户，使用su命令切换到root用户。</p>
</div>
<p><a rel="nofollow" href="https://www.fuwuqiok.com/%e5%a6%82%e4%bd%95%e7%a6%81%e6%ad%a2root%e7%94%a8%e6%88%b7%e7%9b%b4%e6%8e%a5%e7%99%bb%e5%bd%95linux%e6%9c%8d%e5%8a%a1%e5%99%a8/">如何禁止root用户直接登录Linux服务器</a>，首发于<a rel="nofollow" href="https://www.fuwuqiok.com">服务器安全维护工作室</a>。</p>
]]></content:encoded>
			<wfw:commentRss>https://www.fuwuqiok.com/%e5%a6%82%e4%bd%95%e7%a6%81%e6%ad%a2root%e7%94%a8%e6%88%b7%e7%9b%b4%e6%8e%a5%e7%99%bb%e5%bd%95linux%e6%9c%8d%e5%8a%a1%e5%99%a8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
