Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does linux check if ssh is on?

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

How does linux check whether ssh is turned on? In view of this problem, this article introduces the corresponding analysis and answers in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.

1 installation

Apt-get install openssh-server

2 after completion, check whether ssh server is started:

Ps-e | grep ssh

If there is only:

Ssh-agent

Indicates that server is not started

You can start it manually:

Sudo / etc/init.d/ssh start

Or restart ubuntu

3 you can now use putty to connect

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

Rpm-ql openssh-3.5p1-6 to view the installation information of the installation package (such as installation path, configuration files, etc.)

Ps-e | grep ssh to check whether the ssh service is running. If so, you can see something like the following:

2254? 00:00:00 sshd

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

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

Root] # / etc/rc.d/init.d/sshd startroot] # service ssh start

Take a look at the network connection of this ssh service:

Root] # netstat-ntlp

If you see the following:

Tcp 0 0 0.0.0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0

This means that sshd has been able to work properly, if the client (SecurCRT,putty, etc.) can not connect, try to turn off fire prevention

Try the wall: service iptables stop

This is the answer to the question about how to check whether the ssh is enabled by linux. I hope the above content can be of some help to you. If you still have a lot of doubts to solve, you can follow the industry information channel for more related knowledge.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report