In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of how to view the version of SSH in Linux, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value, I believe you will have something to gain after reading this Linux article on how to view the version of SSH. Let's take a look.
Secure Shell (SSH) remotely logs in or executes commands through an encrypted secure communication channel. SSH is designed to replace insecure plaintext protocols such as telnet, rsh, and rlogin. SSH provides a large number of required features, such as authentication, encryption, data integrity, authorization, and forwarding / channel.
SSH1 vs. SSH2
There are some minor version differences in the SSH protocol specification, but there are two major major versions: SSH1 (version number 1.XX) and SSH2 (version number 2.00).
In fact, SSH1 and SSH2 are two completely different and incompatible protocols. SSH2 significantly improves many aspects of SSH1. First of all, SSH is a macro design, several different functions (such as authentication, transmission, connection) are packaged into a single protocol, SSH2 brings more powerful security features than SSH1, such as MAC-based integrity check, flexible session key update, fully negotiated encryption algorithm, public key certificate and so on.
SSH2 is standardized by IETF, and its implementation is widely deployed and accepted in the industry. Because of SSH2's popularity and encryption advantages over SSH1, many products have abandoned support for SSH1. At the time of writing, OpenSSH still supports SSH1 and SSH2, but in all modern Linux distributions, SSH1 is disabled by default on the OpenSSH server.
Method one
If you want to check the SSH version supported by your local OpenSSH server, you can refer to the / etc/ssh/sshd_config file. Open / etc/ssh/sshd_config with a text editor and view the "Protocol" field.
If shown below, it means that the server only supports SSH2.
Protocol 2
If shown below, it means that the server supports both SSH1 and SSH2.
Protocol 1 method 2
If you can't access / etc/ssh/sshd_config because the OpenSSH service is running on a remote server. You can use a SSH client called ssh to check the supported protocols. Specifically, it forces ssh to use a specific SSH protocol, and then we look at the response of the SSH server.
The following command forces ssh to use SSH1:
Ssh-1 user@remote_server
The following command forces ssh to use SSH2:
Ssh-2 user@remote_server
If the remote SSH server only supports SSH2, the first option with "- 1" will appear with an error message like the following:
Protocol major versions differ: 1 vs. 2
If the SSH server supports both SSH1 and SSH2, both commands are valid.
Method three
Another way to check the version is to run the SSH scanning tool, called scanssh. This command line tool is useful when you want to check a set of IP addresses or the entire local network to upgrade SSH1-compliant SSH servers.
Here is the basic SSH version scanning syntax.
Sudo scanssh-s ssh-n [ports] [IP addresses or CIDR prefix]
The "- n" option specifies the SSH port to scan. You can scan multiple ports with all-good separation. Without this option, scanssh will scan port 22 by default.
Use the following command to discover the SSH server in the 192.168.1.0 Compact 24 local network and check the v version of the SSH protocol:
Sudo scan-s ssh 192.168.1.0 take 24
If scanssh reports "SSH-1.XX-XXXX" for a specific IP address, this implies that the minimum version supported by the relevant SSH server is SSH1. If the remote server only supports SSH2,scanssh, "SSH-2.0-XXXX" will be displayed.
This is the end of the article on "how to check the version of SSH in Linux". Thank you for reading! I believe you all have a certain understanding of "how to view the version of SSH in Linux". If you want to learn more, you are welcome to follow the industry information channel.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.