How to view Linux ssh service information and running status

How to view Linux ssh service information and running status

There are many articles about ssh server configuration, such as ssh service configuration under Linux. Here we only list some common commands for viewing ssh service related information.

1 Installation

apt-get install openssh-server

2 After completion, check whether the ssh server is started:

ps -e | grep ssh

If there is only:

ssh-agent

Explanation: The server is not started

It can be started manually:

sudo /etc/init.d/ssh start

Or restart ubuntu

3 Now you can use putty to connect

rpm -qa | grep ssh You can see the ssh installation package in the system

rpm -ql openssh-3.5p1-6 View the installation information of the installation package (such as installation path, configuration file, etc.)

ps -e | grep ssh Check whether the ssh service is running. If so, you can see something similar to the following:

2254 ? 00:00:00 sshd

This proves that ssh is already running, and the process name is sshd

If it is not running, you can run it with the following command:

root]#/etc/rc.d/init.d/sshd start

root]#service ssh start

Let's take a look at the network connection status of this ssh service:

root]#netstat -ntlp

If you see something like this:

tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 22109/sshd

This means that sshd is working properly. If you cannot connect using a client (SecurCRT, putty, etc.), try turning off the firewall.

Try the wall: service iptables stop

The above method of checking Linux ssh service information and running status is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

You may also be interested in:
  • How to check whether the ssh service is installed or started in Ubuntu
  • How to view the status of remote server files in Linux

<<:  MySql 8.0.11-Winxp64 (free installation version) configuration tutorial

>>:  Promise encapsulation wx.request method

Recommend

Example of building a redis-sentinel cluster based on docker

1. Overview Redis Cluster enables high availabili...

Detailed process of using vmware to test PXE batch installation server

Table of contents 1. Preparation 1. Prepare the e...

How to use glog log library in Linux environment

Generate Linux library The Linux version uses cen...

JavaScript Prototype Details

Table of contents 1. Overview 1.1 What is a proto...

Vue implements simple comment function

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

How to install SVN server under Linux

1. Yum installation yum install subversion 2. Con...

Implementation of running SQL Server using Docker

Now .net core is cross-platform, and everyone is ...

Notes on element's form components

Element form and code display For details, please...

Vue3.0 implements the magnifying glass effect case study

The effect to be achieved is: fixed zoom in twice...

MySQL 5.5.27 installation graphic tutorial

1. Installation of MYSQL 1. Open the downloaded M...

The difference and use of json.stringify() and json.parse()

1. Differences between JSON.stringify() and JSON....

Detailed explanation of Vue's SSR server-side rendering example

Why use Server-Side Rendering (SSR) Better SEO, s...

Several common methods of CSS equal height layout

Equal height layout Refers to the layout of child...