ssh is the system's secure shell protocol. Several versions have been developed. Do you know which version of ssh you use? The following small series teaches you how to view the ssh version of the Linux system. Interested friends may wish to understand.
Secure Shell (SSH) remotely logs in or remotely executes commands through an encrypted secure communication channel. SSH is designed to replace unsecure plaintext protocols such as telnet, rsh, and rlogin. SSH provides a number of required features such as authentication, encryption, data integrity, authorization, and forwarding/channel.
SSH1 vs. SSH2
there are some small differences in versions
SSH protocol specifications, but there are two major major version: SSH1 (version 1.XX) and SSH2 (version No. 2.00).
In fact, SSH1 and SSH2 are two completely different and incompatible protocols. SSH2 has significantly improved many aspects of SSH1. First, SSH is a macro design. Several different functions (such as authentication, transmission, and connection) are packaged into a single protocol. SSH2 brings more powerful security features than SSH1, such as MAC-based integrity checking, and flexibility. Session key updates, fully negotiated encryption algorithms, public key certificates, and more.
SSH2 is standardized by the IETF and its implementation is widely deployed and accepted in the industry. Due to the popularity and encryption advantages of SSH2 for SSH1, many products have given up support for SSH1. At the time of this writing, OpenSSH still supports SSH1 and SSH2, but in all modern Linux distributions, OpenSSH server disables SSH1 by default.
Checking the supported SSH protocol version
Method 1
If you want to check the version of the SSH protocol supported by the local OpenSSH server, you can refer to the /etc/ssh/sshd_config file. . Open /etc/ssh/sshd_config with a text editor and look at the “Protocol" field.
If the following is displayed, 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,2
Method 2
If you are running on a remote server because of the OpenSSH service, you cannot access /etc/ssh/sshd_config. You can use an SSH client called ssh to check for supported protocols. Specifically, it is to force ssh to use a specific SSH protocol, and then we can check 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, then the first option with “-1” will result in the following error message:
Protocol major versions differ: 1 vs. 2
If the SSH server supports both SSH1 and SSH2, both commands are valid.
Method 3
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 an SSH1 compliant SSH server.
Below is the basic SSH version scan 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 separate partitions. Without this option, scanssh will scan 22 ports by default.
Use the following command to discover the SSH server on the 192.168.1.0/24 local network and check the SSH protocol v version:
$ sudo scan -s ssh 192.168.1.0/24
If scanssh reports "SSH-1.XX-XXXX" for a specific IP address, this implies that the minimum supported version of the SSH server is SSH1. If the remote server only supports SSH2, scanssh will display "lds" ;SSH-2.0-XXXX”.
The above is the way to view the ssh version of Linux, because the syntax supported by different versions is slightly different, some commands will not be used, resulting in invalid commands.
JITwatch is a code analysis tool for Linux systems. To use JITwatch, you must first
mysql server prompts upgrade, many Linux users after upgrading mysql found always prompted conflict
Linux systems such as Ubuntu or Linux Mint are the main office software. Some versi
Sometimes it is necessary to know the version number of the database in the Linux s
Example of isosize instruction operation in Linux
The implementation principle of Linux system TSO
Techniques for setting up multiple network cards as virtual network cards under Linux
What should I do if I get an error when installing LDAP on Linux under Linux?
What should I do if the U disk file is read-only on Ubuntu and cannot be deleted?
How to use the find command in Linux
How to solve the garbled problem when opening Emacs under Linux?
FreeBSD steps to load iso files through virtual CD-ROMs
Redistribution of IP addresses in Linux systems
How to make the font displayed on the computer more round and clear in Windows XP
Experience sharing - film playback decoding skills
The reason why the WIN7 MAC cannot be modified and the ultimate solution must be successful
What should I do if the NVMe hard disk status detection error in Win10 system?
WinME does not automatically shut down
How to remove the small arrow to restore the beauty of the XP shortcut icon
How to save screenshots in WinXp system? WinXp system saves screenshots
Invincible delete command to delete Windows files
Win7 how to upgrade win10 win7 upgrade win10 graphics tutorial