π¬ What is SSH protocol?
π¬ It is also referred to as Secure Shell, is a method for secure remote login from one computer to another. It is an alternative to
telnetandrlogin
π¬ It protects the communications security and integrity with strong encryption.
π¬ How does it work?
π¬ β It works in client server model.
β The SSH client drives the connection setup and uses
public key cryptographyto verify the identity of the SSH server.β Once a connection is established data that is transmitted is encrypted according to the parameters negotiated in the setup.
π¬ After the setup phase is done, SSH protocol uses strong symmetric encryption and hashing algorithms to ensure the privacy and integrity of the data that is exchanged.
RFC β Link

π¬ What are the options to initiate SSH?
π¬ Amongst the several methods available the most common ones are
passwordsandpublic key authentication.
π¬ In most of automation cases the public key authentication method is preferred. (ANSIBLE uses it)
π¬ Is it driven via a cryptographic key pair β public key and private key?
π¬ Duh?
The keys used for authentication are called SSH keys.
Configure the public key on a server toΒ authorize accessΒ and grant anyone who has a copy of the private key access to the server.
π¬ But WHY Public key?
π¬ β Why not β It is passwordless login, and yet more secure?
β The motivation for using public key authentication over simple passwords is security.
β Public key authentication provides cryptographic strength that even extremely long passwords can not offer
