CentOS modified 22 default port SSH default port

Source: Internet
Author: User

1. Add port 650) this.width=650; "align=" right "src=" http://www.cytisec.com/wp-content/uploads/2012/07/ssh.jpg "style=" padding:0px;margin:0px;border:0px;vertical-align:baseline;float:right; "alt=" ssh.jpg "/>

Vim/etc/ssh/sshd_config

Remove the comments from #port 22 and add a newline to Port 443

If it is not an increase, but rather modify the port, it is recommended to leave 22 port, and so on new port can log in and then removed.

443 is actually the port used by HTTPS, and 3128 is the port used by squid. It is recommended to use big-endian ports, such as 10000~65535.

Restart SSH Service/etc/init.d/sshd restart

2. Firewall Open 443 port

Vi/etc/sysconfig/iptables

Join-a input-m state–state new-m tcp-p tcp–dport 443-j ACCEPT

Restart Firewall/etc/init.d/iptables Restart

3. Masking the default port

It is better to block the default port number 22nd after the new port can be used.

Vi/etc/sysconfig/iptables

In

-A rh-firewall-1-input-m state–state new-m tcp-p tcp–dport 22-j ACCEPT

Comment out the front plus # sign

Restart Firewall/etc/init.d/iptables Restart

Success!


CentOS modified 22 default port SSH default port

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.