---
title: "linux禁止root远程登陆设置"
author: "libin123"
date: "2010-07-14T23:04:05Z"
tags: []
categories: ["操作系统"]
slug: "linux-root"
draft: false
lastmod: "2010-07-14T23:04:05Z"
id: 713000
url: "https://dbua.iteye.com/blog/713000"
---

为增强安全，  
先增加一个普通权限的用户：  
#useradd uploader  
#passwd uploader  
//设置密码

生产机器禁止ROOT远程SSH登录：  
#vi /etc/ssh/sshd\_config

把  
PermitRootLogin yes  
改为  
PermitRootLogin no  
重启sshd服务  
#service sshd restart

远程管理用普通用户uploader登录，然后用 su root 切换到root用户拿到最高权限