Ubuntu basic settings: installation and use of openssh-server

Ubuntu basic settings: installation and use of openssh-server

Record the installation and use of openssh-server in Ubuntu 17.10. After installation, you can use ssh to log in to Ubuntu, so it is one of the basic settings of Ubuntu.

Preparation

Ubuntu version: 17.10
devops@ubuntu:~$ cat /etc/issue
Ubuntu 17.10 \n \l
devops@ubuntu:~$ 
devops@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.10
Release: 17.10
Codename: artful
devops@ubuntu:~$

Ubuntu 17.10, codenamed Artful Aardvark, was officially released on October 19, 2017. It is the first version to replace GNOME, but this is not an LTS version. It will be supported until August 2018 and is a transitional version before the LTS version of Ubuntu in 2018. The installation of openssh-server has little impact on the Ubuntu version, and the basic operation steps are basically the same.

Installation Steps

Follow the steps below to install

Operation log

Here is the log captured in the installed state. The display of apt install will be different

devops@ubuntu:~$ sudo su
[sudo] password for devops: 
root@ubuntu:/home/devops# 
root@ubuntu:/home/devops# apt install openssh-server
Reading package lists... Done
Building dependency tree    
Reading state information... Done
openssh-server is already the newest version (1:7.5p1-10ubuntu0.1).
0 upgraded, 0 newly installed, 0 to remove and 55 not upgraded.
root@ubuntu:/home/devops# 
root@ubuntu:/home/devops# ssh -V
OpenSSH_7.5p1 Ubuntu-10ubuntu0.1, OpenSSL 1.0.2g 1 Mar 2016
root@ubuntu:/home/devops# 
root@ubuntu:/home/devops# /etc/init.d/ssh status
● ssh.service – OpenBSD Secure Shell server
  Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
  Active: active (running) since Sat 2018-03-03 07:58:44 CST; 51min ago
 Process: 3072 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
 Process: 3071 ExecReload=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
 Process: 3167 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
 Main PID: 3179 (sshd)
  Tasks: 1 (limit: 4915)
  Memory: 1.0M
   CPU: 7ms
  CGroup: /system.slice/ssh.service
      └─3179 /usr/sbin/sshd -D
Mar 03 07:58:44 ubuntu systemd[1]: Starting OpenBSD Secure Shell server...
Mar 03 07:58:44 ubuntu systemd[1]: Started OpenBSD Secure Shell server.
Mar 03 07:58:44 ubuntu sshd[3179]: Server listening on 0.0.0.0 port 22.
Mar 03 07:58:44 ubuntu sshd[3179]: Server listening on :: port 22.
root@ubuntu:/home/devops# 
root@ubuntu:/home/devops# /etc/init.d/ssh restart
[ ok ] Restarting ssh (via systemctl): ssh.service.
root@ubuntu:/home/devops#

ssh connection from terminal

liumiaocn:~ liumiao$ ssh [email protected]
[email protected]'s password: 
Welcome to Ubuntu 17.10 (GNU/Linux 4.13.0-21-generic x86_64)
 * Documentation: https://help.ubuntu.com
 * Management: https://landscape.canonical.com
 * Support: https://ubuntu.com/advantage
58 packages can be updated.
32 updates are security updates.
Last login: Sat Mar 3 07:43:23 2018 from 192.168.31.242
devops@ubuntu:~$

Summarize

The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links

You may also be interested in:
  • Detailed explanation of how to pass password to ssh/scp command in bash script
  • Detailed explanation of how to mount remote file systems via SSH on Linux
  • CentOS method to modify the default ssh port number example
  • Detailed installation and use of SSH in Ubuntu environment
  • Instructions for deploying projects to remote machines using the Publish Over SSH plugin in Jenkins
  • CentOS 6.5 configuration ssh key-free login to execute pssh command explanation
  • How to install MySQL via SSH on a CentOS VPS
  • How to configure ssh/sftp and set permissions under Linux operating system
  • Implementation of ssh non-secret communication in linux
  • Explanation of Mac connecting to remote servers through SSH in different terminals

<<:  MySQL password modification example detailed explanation

>>:  JavaScript simulation calculator

Recommend

Docker custom network container interconnection

Table of contents Preface –link Custom Network As...

MySQL master-slave data is inconsistent, prompt: Slave_SQL_Running: No solution

This article uses an example to describe the solu...

uniapp implements date and time picker

This article example shares the specific code of ...

How to install mongodb 4.2 using yum on centos8

1. Make a repo file Refer to the official install...

Detailed tutorial on installing Docker and nvidia-docker on Ubuntu 16.04

Table of contents Docker Installation Nvidia-dock...

Overview and Introduction to Linux Operating System

Table of contents 1. What is an Operating System ...

Detailed explanation of Apache SkyWalking alarm configuration guide

Apache SkyWalking Apache SkyWalking is an applica...

Do you know how to use Vue to take screenshots of web pages?

Table of contents 1. Install html2Canvas 2. Intro...

Database query optimization: subquery optimization

1. Case Take all employees who are not the head o...

CentOS 7.6 installation of MySQL 5.7 GA version tutorial diagram

Table of contents Environment Preparation Environ...

Ideas and codes for implementing Vuex data persistence

What is vuex vuex: is a state manager developed s...