CentOS prohibits root users from remotely logging on via telnet or ssh

Source: Internet
Author: User

AIX

Only the root user can be logged on using su, and direct remote login is prohibited.
1. Disable telnet Logon
Smit chuser
-> Root
-> User can login REMOTELY (rsh, tn, rlogin) = false

**************************************** ***********

Disable telnet/ftp
Stopsrc-t telnet
Stopsrc-t ftp

Enable telnet \ ftp
Startsrc-t telnet
Startsrc-t ftp

**************************************** ***********


2. disable ssh logon.
Vi/etc/ssh/sshd_config
PermitRootLogin no
Restart the ssh service
Stopsrc-s sshd
Startsrc-s sshd

Run the following command to view the service:

Lssrc-a | grep ssh


LINUX

1. in linux, remote login by telnet is disabled for root users by default.

**************************************** *****************************

Set to telnet to linux using the root user
By default, the ROOT user cannot connect to the Linux operating system through telnet, which is also insecure. However, technically speaking, this can be achieved.
# Mv/etc/securetty. bak
Save and exit.
You can use the ROOT user to log on to the Linux system via telnet.

**************************************** **************************************** ***

2. disable ROOT remote SSH Logon:
# Vi/etc/ssh/sshd_config
Set PermitRootLogin yes
Change to PermitRootLogin no
Restart sshd service
# Service sshd restart

**************************************** *********************

List LINUX boot items:
# Chkconfig -- list
List running LINUX services:
# Service -- status-all


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.