Modification and login of SSH port under Linux

Source: Internet
Author: User

modification and login of SSH port under Linux


first modify the configuration fileVi/etc/ssh/sshd_configFind the #port 221 segment, here is the identity by default using 22 port, add the following line:Port 50000and then save the exit1. Port modificationExecute/etc/init.d/sshd Restartthis way the SSH port will work on 50000 at the same time.
2. Firewall Modificationsnow edit the firewall configuration: Vi/etc/sysconfig/iptablesenable port 50000. Add the following line
1 -A INPUT -m state --state NEW -m tcp -p tcp --dport 50000 -j ACCEPT
thenExecute/etc/init.d/iptables Restartnow, use the SSH tool to connect to port 50000 to test for success.
3. Login Testafter the success, you can drop the comment on port 22 of just a few configuration files .
4. A description of the firewall
There are other times when pinging an address: Destination Port unreachable phenomenonThis behavior indicates that the address is present and the ping packet is sent past and successfully returned, that is, 100% receivedBut why is that so? It's a firewall, and it's supposed to shut down the firewall.
1 /etc/init.d/firewallstop -- /etc/init.d/firewalldisable


 

From for notes (Wiz)

Modification and login of SSH port under Linux

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.