How SSH works
I'm building a project that also allows you to SSH but I was trying to learn a little bit more about how the network protocol actually works.
I understand the gist of it, and I understand that it's a way to push encrypted data via TCP from a client to a server but I'm confused regarding the encryption process.
I know the packet is made up of Packet length, padding amount, payload, padding, and message authentication code but couldn't someone just intercept the packet and decrypt it themselves since they would have all the information.
I'm sure I'm just misunderstanding a step of the process but I would love if someone could shed some light as I wasn't really understanding Chatgpt's and the stackoverflow responses.
Solution:Jump to solution
but couldn't someone just intercept the packetYes
and decrypt it themselvesNo
since they would have all the information....
2 Replies
Solution
but couldn't someone just intercept the packetYes
and decrypt it themselvesNo
since they would have all the information.No, they don't have the symmetric encryption keys. The symmetric encryption keys are either shared via RSA, or negotiated via Diffie-Helman.
thank you