View linux ssh service information and health methods
- 2021-01-22 08:27:25
- OfStack
Many articles have been written about ssh server configuration, such as ssh service configuration under Linux. Here are just a few common commands for viewing ssh service information.
1 installation
apt-get install openssh-server
2. After completion, check whether ssh is enabled:
ps -e | grep ssh
If only there were:
ssh-agent
server is not started
You can start it manually:
sudo /etc/init.d/ssh start
Or restart ES32en
The putty connection is now ready to use
rpm - qa | grep ssh can see ssh installation package in the system
rpm-ql openssh-3.5p1-6 View the installation information (such as installation path, configuration file, etc.)
ps - e | grep ssh view ssh services have run, if you have, you can see similar to the following content:
2254 ? 00:00:00 sshd
This proves that ssh is already running, and the process name is sshd
If not, you can run it with the following command:
root]#/etc/rc.d/init.d/sshd start
root]#service ssh start
Let's also look at the network connection of the ES73en service:
root]#netstat -ntlp
If you see the following:
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 22109/sshd
If the client (SecurCRT,putty, etc.) fails to connect, try to turn off the fire
Wall try: service iptables stop