How to install and configure SSH service in Ubuntu 18.04

How to install and configure SSH service in Ubuntu 18.04

Install ssh tool

1. Open the terminal and type the following command:

apt-get update
apt-get install openssh-server

2. Select Y to continue:

Start SSH service

1. Type the following command:

/etc/init.d/ssh start 

Note: The restart and shutdown commands are as follows:

/etc/init.d/ssh restart #Restart SSH service /etc/init.d/ssh stop #Shut down SSH service

2. Check the process to see if it is started successfully. Type the following command:

ps -e | grep sshd 

The SSH service can only be used with a process.

Configure the root user SSH service

After the SSH service is installed in Ubuntu, check whether the root user is allowed to log in. If not, the root user cannot be logged in remotely and the configuration needs to be modified.

1. First, open "/etc/ssh/sshd_config"

gedit /etc/ssh/sshd_config

2. Check whether there is "PermitRootLogin yes". If not, add it. Save and exit after completion.

This is the end of this article about the steps to install and configure SSH service in Ubuntu 18.04. For more information about installing SSH service in Ubuntu 18.04, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • How to install ssh service and realize remote access in ubuntu16.04
  • How to check whether the ssh service is installed or started in Ubuntu
  • Detailed explanation of the installation and login of ssh service under Ubuntu (ssh remote login)
  • Detailed tutorial on installing openssh server on ubuntu

<<:  Detailed explanation of the order of JS object traversal

>>:  CentOs7 64-bit MySQL 5.6.40 source code installation process

Recommend

Refs and Ref Details in Vue3

The editor also shares with you the corresponding...

Native JS to implement login box email prompt

This article shares a native JS implementation of...

Summary of Binlog usage of MySQL database (must read)

I won't go into details about how important b...

Solution to the inaccessibility of Tencent Cloud Server Tomcat port

I recently configured a server using Tencent Clou...

Linux parted disk partition implementation steps analysis

Compared with fdisk, parted is less used and is m...

React implements infinite loop scrolling information

This article shares the specific code of react to...

Bootstrap realizes the effect of carousel

This article shares the specific code of Bootstra...

HTML+CSS makes div tag add delete icon in the upper right corner sample code

1. Requirements description Display the delete ic...

WeChat applet development practical skills: data transmission and storage

Combining the various problems I encountered in m...

How to use custom images in Html to display checkboxes

If you need to use an image to implement the use ...

How to disable ads in the terminal welcome message in Ubuntu Server

If you are using the latest Ubuntu Server version...

The homepage design best reflects the level of the web designer

In the many projects I have worked on, there is b...

Several ways to easily traverse object properties in JS

Table of contents 1. Self-enumerable properties 2...

Detailed explanation of how to synchronize data from MySQL to Elasticsearch

Table of contents 1. Synchronization Principle 2....