Ubuntu starts the SSH service remote login operation

Ubuntu starts the SSH service remote login operation

ssh-secure shell, provides secure remote login. When developing embedded systems and setting up a Linux development environment, installing the SSH service is an essential step. SSH makes it convenient for people in a development team to log in to a server to write, compile, and run code. Facilitates code sharing and management. SSH is a security protocol that is mainly used to encrypt remote login session data to ensure the security of data transmission.

0. SSH is divided into clients openssh-client and openssh-server

If you just want to log in to another machine's SSH, you only need to install openssh-client (Ubuntu has it installed by default, if not, then sudo apt-get install openssh-client). If you want to open the SSH service on this machine, you need to install openssh-server.

1. Check whether the ssh-server service is installed in the current Ubuntu. By default, only the ssh-client service is installed.

dpkg -l | grep ssh 

2. Install ssh-server service

sudo apt-get install openssh-server 


Check the installed services again:

dpkg -l | grep ssh 


Then confirm that ssh-server is started:

ps -e | grep ssh 


If you see sshd, it means ssh-server has been started.

If not, you can start it like this: sudo /etc/init.d/ssh start or sudo service ssh start

Configuration related:

The ssh-server configuration file is located in /etc/ssh/sshd_config, where you can define the SSH service port. The default port is 22, and you can define it to other port numbers, such as 222. (Or add a "#" sign to "PermitRootLogin without-password" in the configuration file to comment it out, and then add a sentence "PermitRootLogin yes")

Then restart the SSH service:

sudo /etc/init.d/ssh stop
sudo /etc/init.d/ssh start

3. Log in to SSH (Linux)

ssh [email protected]
Among them, username is the user on the 192.168.1.103 machine, and the password needs to be entered.
Disconnect: exit

4. Testing

(1) Server: 192.168.1.103 (user jackgao)


(2) Client: 192.168.1.104 (root user)


(3) Client remote ssh login server


(4) Exit remote login

In addition, if the SSH service is installed, you can use xshell or putty to connect to this Ubuntu under Windows (but you have to enter the username and password every time. Even if xshell can store the username and password, the login speed is very slow. So you can use the public key login method to improve speed and security.

Reference links and related:

1. Ubuntu starts the SSH service
http://www.cnblogs.com/xiazh/archive/2010/08/13/1798844.html
2. Ubuntu 14.04 remote login server – ssh installation and configuration
http://jingyan.baidu.com/article/9c69d48fb9fd7b13c8024e6b.html
3. How to install and use ssh in Ubuntu 14.04
http://jingyan.baidu.com/article/0eb457e52e50ad03f1a90518.html
4. Ubuntu 16.04 installation + xshell connection to virtual machine
http://blog.csdn.net/chi_wawa/article/details/52467914
5. Ubuntu SSH configuration and file transfer with xshell
http://blog.sina.com.cn/s/blog_53683dc20102v3wz.html
6. Simple example of ssh remote login command
//www.jb51.net/os/201307/228495.html
7. Linux for Beginners Series: [4] SSH password-free login to remote server
http://jingyan.baidu.com/article/2fb0ba4043124a00f2ec5f0f.html
8. Getting started with SSH remote login to a server under Linux
http://www.cnblogs.com/plwang1990/p/5279451.html

This is the end of this article about how to enable SSH service remote login operation in Ubuntu. For more information about how to enable SSH service remote login operation in Ubuntu, please search previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Python pexpect ssh remote login server method
  • ssh changes the default port number and implements password-free remote login
  • Novice learn Linux commands: ssh command (remote login)
  • SSH remote login and port forwarding detailed explanation
  • How to modify SSH port and disable root remote login in centos 6.5
  • Linux remote login ssh password-free configuration method

<<:  Mysql implementation of full-text search and keyword scoring method example

>>:  8 essential JavaScript code snippets for your project

Recommend

Vue+Openlayer realizes the dragging and rotation deformation effect of graphics

Table of contents Preface Related Materials Achie...

Detailed explanation of four solutions to floating problems in CSS layout

1. Cause: The effect after the subbox is set to f...

Super detailed steps to install zabbix3.0 on centos7

Preface Recently, part of the company's busin...

When backing up files in Centos7, add the backup date to the backup file

Linux uses files as the basis to manage the devic...

How to implement responsive layout with CSS

Implementing responsive layout with CSS Responsiv...

Understand the principle of page replacement algorithm through code examples

Page replacement algorithm: The essence is to mak...

Detailed explanation of generic cases in TypeScript

Definition of Generics // Requirement 1: Generics...

Vue implements horizontal beveled bar chart

This article shares the specific code of Vue to i...

Detailed explanation of nginx request header data reading process

In the previous article, we explained how nginx r...

Vue implements nested routing method example

1. Nested routing is also called sub-routing. In ...

How to use xshell to connect to Linux in VMware (2 methods)

【Foreword】 Recently I want to stress test ITOO...