Modify ssh port and disable root remote login in linux

Source: Internet
Author: User
Tags ssh port
In linux, modify the ssh port and disable root remote login settings-Linux Enterprise Application-Linux server application information. For details, refer to the following section. Modify ssh port 22 in linux
Vi/etc/ssh/ssh_config
Vi/etc/ssh/sshd_config

Then, change the value to port 8888.
Service sshd restart (redhat as3) as root)
Use putty, port 8888

In Linux, the default SSH port is 22. For security reasons, modify the SSH port to 1433 as follows:

/Usr/sbin/sshd-p 1433

To enhance security
First, add a user with normal permissions:
# Useradd uploader
# Passwd uploader
// Set the password

The production machine prohibits ROOT remote SSH login:
# Vi/etc/ssh/sshd_config

Set
PermitRootLogin yes
Change
PermitRootLogin no
Restart sshd service
# Service sshd restart

For remote management, use uploader as the common user to log on, and then use su root to switch to the root user to obtain the highest permission.
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.