Add or modify ports for the SSH service

Source: Internet
Author: User

Usually ssh telnet to the default port is 22, this port is generally can be changed or added, the configuration file location in:/etc/ssh/sshd_config by editing the file can modify the SSHD service related configuration, the following new Port 2223, That is, in addition to 22 port can log on to the server outside 2223 can also log in

Execute command vim/etc/ssh/sshd_config Edit configuration file

  

You can see that the default port is 22 and comment, then remove the comment and add a new line to Port 2223 and then save and exit

  

Now restart the SSH service: systemctl restart Sshd.service

After rebooting, use the original 22 and 2223 ports can be connected, when not the default port, you need to use ssh -P 2223 hostname to connect, where hostname is the host name, Here SSH multi-port login is configured to complete

Add or modify ports for the SSH service

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.