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:
but couldn't someone just intercept the packet
Yes
and decrypt it themselves
No
since they would have all the information....
Jump to solution
2 Replies
Solution
Kyle Butt
Kyle Butt3mo ago
but couldn't someone just intercept the packet
Yes
and decrypt it themselves
No
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.
Joshua C
Joshua COP3mo ago
thank you

Did you find this page helpful?