How Ubuntu opens SSH service

Source: Internet
Author: User
Tags ssh port

 how Ubuntu opens SSH serviceCategory: Linux operations and Operation Fundamentals 2013-02-24 13:33 2868 people read reviews (0) favorite reports sshd Ubuntu

Ubuntu does not have the default SSH service installed, if you link ubuntu via SSH, you need to manually install Ssh-server. To determine if the SSH service is installed, you can do this by:

[Email protected]:~$ ssh localhost

Ssh:connect to host localhost Port 22:connection refused

As shown above, it means that no installation has yet been installed and can be installed via apt, with the following commands:

-desktop:~$ sudo apt-get install Openssh-server

[Email protected]:~$ sudo apt-get install Openssh-server

The system will be installed automatically, after the installation is complete, start the service first:

@xjj-desktop:~$ sudo/etc/init.d/ssh Start

[Email protected]:~$ sudo/etc/init.d/ssh Start

After you start, you can see if the service starts correctly with the following command

@xjj-desktop:~$ ps-e|grep SSH

6212? XX: +sshd

[Email protected]:~$ ps-e|grep ssh 6212? 00:00:00 sshd

The above indicates the start OK. Note that the default SSH port is 22, you can change the port, stop before changing,

And then start is ready. The configuration is configured under/etc/ssh/sshd_config, as shown below.

XJJ@xjj-desktop:~$ vi/etc/ssh/sshd_config

# Package generated configuration file

# See the sshd (8) manpage for details

# What ports, IPs and protocols we listen for

Port

# Package generated configuration file

# See the SSHD (8) manpage for details

# What ports, IPs and protocols we listen for

Port 22

Finally, it should be the time to connect. Take a look at the following command:

XJJ@xjj-desktop:~$ ssh exceljava@192.168. 158.129

[Email protected]:~$ vi/etc/ssh/sshd_config

Summarize:

I hope this article describes the Ubuntu installation using SSH can be helpful to the reader, more knowledge about the Linux system has yet to be explored and learned by readers.

How Ubuntu opens 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.