Secure Shell (SSH) is a widely used Transport Layer Protocol to secure connections between clients and servers. SSH is the underlying protocol that Te

SSH Handshake Explained

submited by
Style Pass
2021-06-12 17:00:04

Secure Shell (SSH) is a widely used Transport Layer Protocol to secure connections between clients and servers. SSH is the underlying protocol that Teleport uses to secure connections between clients and servers. Below is a relatively brief description of the handshake that occurs to establish a secure channel between a client and a server.

SSH begins by both sides sending a version string to each other. Nothing terribly exciting happens in this part of the handshake, but it should be noted that most relatively modern clients and servers only support SSH 2.0 due to several flaws in the design of SSH1 most notably:

The key exchange (sometimes called KEX) is used by the client and server to exchange information in public that leads to a secret shared by the client and server that an observer can not discover or derive from public information.

The key exchange is kicked off by both sides sending a SSH_MSG_KEX_INIT message to each other with a list of cryptographic primitives they support with the order reflecting their preference.

Leave a Comment