Linux VPS Modify SSH default Port method

Source: Internet
Author: User
Tags ssh vps ssh port

Modify Linux VPS ssh 22 port to unlock the annoyance of SSH explosion, check the log will find a lot of

The Linux login log is in the following directory:

Cd/var/log

To view the login log for an SSH user:

Less secure

Linux Log Management

If a lot of foreign IP logins fail, it's a malicious explosion.

Exhaustive method, or called brute force crack method, is a kind of needle for the password of the deciphering method, the password will be calculated one by one until the real password to find out. For example, a password that is known to be four-bit and full of numbers may have 10000 combinations, so you can try 10,000 times to find the correct password. Theoretically using this method can break any kind of password, the problem is only how to shorten the time of trial and error. So some people use computers to increase efficiency, and some are supplemented by dictionaries to narrow the range of password combinations.

Login VPS

It is recommended that you turn off the firewall first and add the ports you want to open (always, or you won't get into the system)

Modify File/etc/ssh/sshd_config

The code is as follows Copy Code
Remove the # number in front of the #port 22.
If you define an SSH port number of 11111
Port 11111 Wq Save exit
Service sshd Restart Restart services

Open another terminal

Test Login

The code is as follows Copy Code

SSH root@ip-p 11111

After the test is successful, confirm that Iptable has added 11111 ports open, starting firewall OK

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.