Posts

Showing posts from September, 2021

How does SSH key authentication work?

Image
From the user's point of view, an SSH connection is established like a telnet session (connection request, login request, password request), the principle is actually much more complex. SSH guarantees: Confidentiality: packet encryption guarantees this. The old services such as telnet, rlogin... sent the data in the clear; Integrity: SSH ensures that packets flowing from one host to another are not corrupted; Authentication: each SSH connection verifies the identity of the server (by its host key ~ / .ssh / known_hosts ) then that of the client (by password or public key ~ / .ssh / authorized_keys ); Authorization: it is possible with SSH to limit the actions authorized to the user ( ~ / ssh / .authorization ); Tunneling: SSH is used to secure a service whose information usually circulates in clear (POP, IMAP, VNC...). Other aspects of tunneling are the securing of the X11 protocol (X11forwarding), and the use of private SSH Keys located on a remote host (Agent forwarding). SSH is...

SSH Keys Authentication Method

Image
Until now, we have made a habit of using the password as the sole factor of authentication. However, you should know that it is also possible to use another factor, a key. This is sometimes preferred because the key avoids having to remember different passwords systematically. Here we will see the general operation of this authentication method. It is common on SSH keys servers to only allow key authentication to secure this protocol. Therefore, the key generation is mainly done under Linux without too much problem since OpenSSH is natively present there. Under Windows, however, some operations have to be carried out to generate and send our key to the server. SSH Keys authentication is therefore done via a pair of keys, and the client will thus generate a pair of keys, one public and one private. He will, of course, keep his private key to himself and send the public key to the SSH server, which will store it in a place provided for this purpose. Generation of the key Since an SSH c...