Installing and configuring SSH services under Linux

Source: Internet
Author: User

First, use the command to detect whether the SSH service has been installed on the Linux system: (Command:rpm-qa |grep ssh)

If you do not have an SSH package installed, you can install it via the Yum or RPM installation package (command:yum install ssh)

Third, after the installation is complete, start the SSH service (command:service sshd start or/etc/init.d/sshd start)

Iv. viewing and editing the SSH service configuration file (command:vi/etc/ssh/sshd_config)

V. Modify its default port number to 10022

Use the VI command to enter the editing state on the keyboard "I", find "#port 22" This line, the previous "#" removed, and the port 22 is modified to 10022; Press "ESC" key to exit the editing state, while holding down the "shift+:" Key, enter "Wq" Save exit! Of course, after modifying the configuration file, you need to restart the SSH service!

Vi. Changing the firewall configuration

After performing the above steps, it is found that using port 10022 is not connected to Linux, this is because the Linux firewall is mischief, so we need to open 10022 port!

1. Use the command to view firewall configuration information (command:service iptables status)

See, I've opened up Port 10022! The specific Open command is: (iptables-i input-p tcp--dport 10022-j ACCEPT use service iptables Save configuration, restart the firewall! )

Installing and configuring SSH services 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.