The release of OpenSSH 9.0 has been announced, an open implementation of the client and server for working with SSH 2.0 and SFTP protocols. In this new version, the scp utility has been switched by default to use SFTP instead of the outdated SCP/RCP protocol.
SFTP employs more predictable methods for handling names and does not utilize shell glob pattern processing for filenames on the other host, which creates security issues. Specifically, when using SCP and RCP, the server decides which files and directories to send to the client, and the client only verifies the correctness of the returned object names, which can lead to transferring other file names that differ from the requested ones without proper checks on the client side. server transfer different filenames that do not match the requested ones.
The SFTP protocol is free from these issues but does not support revealing special paths, such as '~/'. To address this difference, starting with OpenSSH 8.7, the SFTP server implementation supports the protocol extension 'expand-path@openssh.com' to reveal paths ~/ and ~user/.
When using SFTP, users may also encounter compatibility issues due to the need for double escaping of special characters in path expansion requests in SCP and RCP, to prevent their interpretation on the remote side. In SFTP, such escaping is not required, and extra quotes may lead to data transfer errors. At the same time, OpenSSH developers have declined to add an extension to replicate the behavior of scp in this case, as double escaping is seen as a flaw that makes no sense to replicate.
Other changes in the new release include:
- In ssh and sshd, the hybrid key exchange algorithm 'sntrup761x25519-sha512@openssh.com' (ECDH/x25519 + NTRU Prime) is enabled by default, resistant to brute-force attacks on quantum computers and combined with ECDH/x25519 to block potential problems in NTRU Prime that may arise in the future. In the list of KexAlgorithms, which defines the order of key exchange method selection, the mentioned algorithm is now placed first and is prioritized higher than ECDH and DH algorithms.
Quantum computers have not yet reached a level that allows them to break traditional keys, but the use of hybrid protection will protect users from attacks related to the retention of intercepted SSH sessions with the expectation that they can be decrypted in the future when the necessary quantum computers become available.
- The sftp-server has added the 'copy-data' extension, allowing data to be copied on the server side without transit sending to the client, provided the source and target files are on the same server. server.
- The sftp utility has added the 'cp' command to initiate file copying on the server side by the client.
Source: opennet.ru
