Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to install and use openssh-server in Ubuntu environment

Shulou Source: shulou.com Published: 2022-06-02 00:14:40 10月02日 Update

This article shows you how to install and use openssh-server in the Ubuntu environment, the content is concise and easy to understand, can definitely brighten your eyes, through the detailed introduction of this article, I hope you can get something.

Prepare beforehand

Ubuntu version: $cat / etc/issueUbuntu 17.10\ n\ ldevops@ubuntu:~$ devops@ubuntu:~$ lsb_release-aNo LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 17.10Release: 17.10Codename: artfuldevops@ubuntu:~$

The 17.10 Ubuntu code name Artful Aardvark, officially released on October 19, 2017, is the first version of the replacement GNOME, but this is not a LTS version and will be supported until August 2018, a transitional version prior to the 2018 LTS version of Ubuntu. The installation of openssh-server basically has very little impact on the version of Ubuntu, and the basic steps are roughly the same.

Installation steps

Follow the installation steps below to install

Operation log

If you grab the logs in the state of installation here, the apt install display will be different.

Devops@ubuntu:~$ sudo su [sudo] password for devops: root@ubuntu:/home/devops# root@ubuntu:/home/devops# apt install openssh-serverReading package lists... DoneBuilding dependency tree Reading state information... Doneopenssh-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- VOpenSSH_7.5p1 Ubuntu-10ubuntu0.1, OpenSSL 1.0.2g 1 Mar 2016root@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-DMar 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 the terminal

Liumiaocn:~ liumiao$ ssh devops@192.168.31.19devops@192.168.31.19's password: Welcome to Ubuntu 17.10 (GNU/Linux 4.13.0-21-generic x861664) * Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage58 packages can be updated.32 updates are security updates.Last login: Sat Mar 3 07:43:23 2018 from 192.168.31.242devops @ ubuntu:~$ the above is how to install and use openssh-server in a Ubuntu environment Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Tags: Version step environment Zhongan content skills log knowledge different concise consistent concise this is not code basic operation that is articles more different status Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Shulou Information Xiaomi Huawei macOS