Disable Direct Root Login and User Access via SSH to Server禁用直接根登录和用户接入通过SSH服务器

Everybody knows, including hackers and attackers that all Linux and UNIX flavored systems come with a all powerful root user account, which once get compromised, mean all hell breaks loose.大家都知道,包括和黑客攻击,所有的Linux和Unix系统的风格来与所有的强大root用户帐户,一旦获得妥协,意味着所有的地狱休息松散。 So it’sa good security practice to disable the ability for root user to able to login and gain access to the server system via SSH directly (of course, the system must have disabled FTP access).因此,这是良好的安全实践中禁用的能力,为root用户,以能够登录和获取服务器系统通过SSH直接(当然,系统必须有残疾人士的FTP访问) 。 After disabling direct root SSH remote login, the chance for the brute force hacking to success is greatly reduced.停用后,直接根的SSH远程登录,有机会为强权的黑客成功之道是大大减少。

To turn off and disable direct root SSH login, follow this simple tutorial:要关闭和禁用直接根的SSH登录,按照这个简单的教程:

IMPORTANT: Make sure you have another account (preferably belongs to wheel user group too) which is able to login via SSH remotely, and able to SU to root user account.重要事项:请确保您拥有另一个帐号(最好是属于车轮用户组太)是能够通过SSH登录远程,并能够苏以root用户的帐户。 Else you risk been locked out from your server.否则,你的风险被锁定,从您的服务器。

  1. SSH into server and login as root.到SSH的服务器和以root登入。
  2. In command shell, use pico or vi to edit sshd_config file by typing one of the following commands:在命令外壳,使用微微或vi编辑sshd_config文件中键入下列命令之一:

    pico /etc/ssh/sshd_config微微的/ etc / ssh / sshd_config
    vi /etc/ssh/sshd_config六的/ etc / ssh / sshd_config

  3. Scroll down the SSH server configuration file and locate a line like below:向下滚动的SSH服务器配置文件,并找出一条线一样,如下:

    #PermitRootLogin yes # permitrootlogin是

  4. Uncomment the line by removing the hash symbol (#), and then change the “yes” to “no”.注释行删除散列符号( # ) ,然后改变“是” “否” 。 The final line should look like below:最后一行看起来应该像如下:

    PermitRootLogin no permitrootlogin没有

  5. Save the config file.保存配置文件。 In pico, press Ctrl-o, follow by Ctrl-x.在微微,按下Ctrl -澳,后续由按Ctrl - X的。 In vi, type :wq and press Enter.在六,类型: wq并按下Enter 。
  6. Restart SSH server by typing the following command in command line, and press Enter:重新启动的SSH服务器上键入以下命令,在命令行中,并按下ENTER :

    /etc/rc.d/init.d/sshd restart在/ etc / rc.d / init.d /的sshd重新启动

  7. Logout from SSH connection.登出从ssh连接。 Try to login as root, it should fail with Access denied error.尝试以root登入,它应失败,拒绝访问错误。 To access root account, login with your own user name and password, and then SU to root.访问root帐号,登录您自己的用户名和密码,然后向苏根。

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要说明 :这是一个机器翻译网页是“按原样”提供的担保。 Machine translation may be difficult to understand.机器翻译可能很难理解。 Please refer to请参阅 original English article英文原版的文章 whenever possible.只要有可能。

Share and contribute or get technical support and help at分享和贡献,或取得技术的支持和帮助,在 My Digital Life Forums 我的数字生活论坛 .



Leave a Reply离开的答复

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> 您可以使用这些标签:的<a href="" title=""> <abbr title=""> <acronym title="">的<b> <blockquote cite=""> <cite>的<code> <删除日期时间= “ ” >的<em>的<i> <q cite=""> <strike>的<strong>

Subscribe without commenting订阅无评论


Custom Search

New Articles新的条款,

Incoming Search Terms for the Article传入的搜索条件文章

disable remote root login 禁用远程登录根 - - linux disable ssh for user Linux的禁用的SSH用户 - - disable remote root 禁用远程根 - - disable root user 禁用root用户 - - Disabling root login 禁用根登录 - - disable ssh login for user 禁用的SSH登录用户 - - root ssh Access denied 根SSH访问,否认 - - disable remote ssh 禁用远程的SSH - - root disabled 根残疾人士 - - freebsd ssh access denied FreeBSD的SSH访问,否认 - - Disable user ssh login 禁用用户的SSH登录 - - linux disable remote root login Linux的禁用远程登录根 - - sshd root login sshd根登录 - - disable SSH remote login root 禁用的SSH远程登录根 - - enable remote ssh login 启用远程的SSH登录 - - ssh root access denied SSH的根访问被拒绝 - - ssh login user SSH的登录用户 - - disable direct root login 禁用根直接登录 - - iphone ssh access denied iphone SSH访问,否认 - - ssh access denied SSH访问,否认 - - no root login for linux 没有根登录为Linux - - disable ssh root access 禁用SSH的根访问 - - disable ssh for user 禁用的SSH用户 - - disable remote root login linux 禁用远程登录Linux的根 - - disable root user+mysql 禁用root用户+ MySQL的 - - linux disable user login ssh Linux的禁用用户登录的SSH - - linux disable login shell access Linux的禁用登录壳访问 - - root login ssh 根登录的SSH - - remote ssh login root linux SSH的远程登录Linux的根 - - linux no root login Linux的没有根登录 - - direct file access valid login 档案存取直接有效的登录 - - disable ssh remote login 禁用的SSH远程登录 - - disable remote ssh root access 禁用远程SSH的根访问 - - switch off root login 关掉根登录 - - freebsd disable root FreeBSD的禁用根 - - disable ssh login 禁用的SSH登录 - - freeBSD disable ssh FreeBSD上禁用的SSH - - remove remote access for root 删除远端存取根 - - disable remote login ssh 禁用远程登录的SSH - - cpanel disable root ssh 禁用的cPanel根的SSH - - enable root ssh access freebsd 使根SSH访问的FreeBSD - - iphone turn off ssh iphone关闭的SSH - - linux user ssh access Linux用户SSH访问 - - all 全部 - - disable root ssh access 禁用根SSH访问 - - su to root alert 苏根,以提高警觉 - - freebsd ssh enable root access remote FreeBSD上的SSH ,使根存取远端 - - Unix access denied for root user UNIX的访问被拒绝为root用户 - - linux disable root remote login Linux的禁用根远程登录 - - root login disable 根登录禁用 - -