A Network Protocol used to enable developers to manage Server and network devices remotely with encryption
SSH Packet
Encryption in transit
The diagram at the left hand side shows all the components of a SSH packet. The diagram at the right hand side shows only Packet Length and Message Authentication Code are unencrypted when the SSH packet is transmitted over the Computer Network.
Packet Component
Purpose
Packet Length
Indicates the total length of the packet in Byte (excluding the length field itself).
Padding amount
Determines the size of padding.
Payload
The actual data being transmitted. Usually compressed with a tool like zlib - Wikipedia.
Padding
Randomly generated bytes used to obscure the true length of the payload, making it harder to analyze the traffic.
Message Authentication Code
A Hash Digest calculated using the packet contents and a shared secret key. This ensures the packet hasn’t been tampered with and originates from the correct sender.
Why not just use the good old username and password?
First, password is vulnerable to brute-force attacks, you know users tend to set weak passwords :)
Second, we may have multiple users accessing the same remote server account. Using password means all users share the same password, on the other hand, with public-key, each user has his own private key to access the remote server. When we want to remove a user’s access, we just need to remove his public key from the remote server.