Detailed Ubuntu under the installation and Landing SSH service (SSH remote login) _linux

Source: Internet
Author: User
Tags ssh ssh account

Ubuntu does not have SSH service installed by default, and if you connect to Ubuntu remotely via SSH, you will need to manually install Ssh-server.

To determine whether or not to install the SSH service, you can do so by using the following command:

Ps-e|grep SSH

The output is as follows:

zht@zht-ubuntu:~$ ps-e|grep ssh
 2151?    00:00:00 ssh-agent
 5313?    00:00:00 sshd

Ssh-agent said Ssh-client started, Sshd said Ssh-server started.

If sshd is missing, the SSH service is not started or is not installed.

To install the ssh-client command:

sudo apt-get install openssh-client

To install the Ssh-server command:

sudo apt-get install Openssh-server

After the installation is complete, start the service first:

Sudo/etc/init.d/ssh start

After startup, you can view the correct startup through Ps-e|grep ssh.

SSH Service The default port is 22, you can change the port, and use the following command to open the SSH configuration file:

sudo gedit/etc/ssh/sshd_config

The contents of the configuration file are as follows:

# Package generated configuration file   
# the SSHD (8) manpage   
for details # What ports, IPs and protocols we Sten for  
Port 
# Package generated configuration file # and the 
sshd (8) manpage for details 
# What Ports , IPs and protocols we listen for 

After modifying the port number (port), restarting the SSH service will take effect with the following commands:

Sudo/etc/init.d/ssh restart

SSH service is launched, you can login, login command format: SSH account @ip Address

For example:

SSH test@192.168.135.249

When prompted to enter the password for test, you can log on remotely.

Exit Remote login Command: Exit

The following illustration shows:

Original link: http://blog.csdn.net/zht666/article/details/9340633

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

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.