CentOS6.5 changing SSH port issues

Source: Internet
Author: User

Changes to the SSH port today, the discovery of the change after the sshd service does not take effect, the test sshd port changed to 1024 below the port does not take effect, change to 1024 and more ports can take effect.

This is strange, as long as the port does not conflict, the SSH port theoretically can be modified to any value. However, it is said that we are advised to use more than 1024 of the port, is this really the reason? Restart the system to try or not, suddenly think of a thing-selinux. Is this a mess? Use the command Getenforce to see that SELinux is on, use the Setenforce 0 command to shut it down temporarily, and then change the port to a port less than 1024 in the/etc/ssh/sshd_config file, and restart the sshd service. Use the netstat command to view Port discovery. It's really a problem with SELinux.

To permanently close the SELinux method:

Vi/etc/sysconfig/selinux change selinux=enforcing to Selinux=permissive or selinux=disabled


This article is from the "Gan mu" blog, please be sure to keep this source http://ganmu.blog.51cto.com/9305511/1891160

CentOS6.5 changing SSH port issues

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.