Start the SSH server in Ubuntu

Source: Internet
Author: User

Http://www.hengxinsoft.com/2009/12/ubuntu%E4%B8%8B-ssh%E6%9C%8D%E5%8A%A1%E7% AB %AF%E5%90%AF%E5%8A%A8/

Http://doc.linuxpk.com/42642.html

 

Run the following command on the terminal:

SSH localhost

If the following error occurs, it is likely that the ssh-server has not been installed:

SSH: connect to host localhost port 22: Connection refused

Install SSH-Server:

Sudo apt-Get install OpenSSH-Server

Start ssh-Server

Sudo/etc/init. d/ssh start

Run the SSH localhost command to test the connection.

How to Set Up Automatic startup of SSH and other services with the system startup

Method 1:

VI/etc/rc. local
Add: Service sshd start or/etc/init. d/sshd start

Method 2: Enter/etc/rc. d. Then enter the corresponding running
level, for example, rc3.d. change the SSH service with K headers to
starting with S

modify sshd_config in/etc/ssh

locate the port and change it to the desired port.

Find permitrootlogin and remove the preceding comment. Yes: allow the root user to log on remotely, no indicates that root remote logon is not allowed.

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.