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

How to create a Django project + connect to MySQL

1: django-admin.py startproject project name 2: c...

Learn about TypeScript data types in one article

Table of contents Basic Types any type Arrays Tup...

Detailed explanation of character sets and validation rules in MySQL

1Several common character sets In MySQL, the most...

Implementation of CSS3 3D cool cube transformation animation

I love coding, it makes me happy! Hello everyone,...

A brief discussion of 12 classic problems in Angular

Table of contents 1. Please explain what are the ...

The principles and defects of MySQL full-text indexing

MySQL full-text index is a special index that gen...

Introduction to reactive function toRef function ref function in Vue3

Table of contents Reactive Function usage: toRef ...

Record the whole process of MySQL master-slave configuration based on Linux

mysql master-slave configuration 1. Preparation H...

Basic syntax of MySQL index

An index is a sorted data structure! The fields t...

A Brief Analysis of CSS Selector Grouping

Selector Grouping Suppose you want both the h2 el...

Native js implementation of magnifying glass component

This article example shares the specific code for...

How to configure Linux to use LDAP user authentication

I am using LDAP user management implemented in Ce...

MySQL 5.7.15 installation and configuration method graphic tutorial (windows)

Because I need to install MySQL, I record the ins...