DEV Community

Hari Kotha
Hari Kotha

Posted on

Simple intro to SSH

SSH authentication is based on private and public keys pair.

intro-to-ssh-cover

User generates a key pair consisting of a private key and a public key. The private key is kept securely on the user's computer, while the public key is uploaded to the server.

When the user tries to connect to the server, the server sends a challenge to the client. The challenge is a random string that is encrypted with the server's public key.

The client receives the challenge and decrypts it using its private key. The client sends the decrypted challenge back to the server.

The server verifies that the decrypted challenge matches the original challenge. If it does, the server grants access to the client. else server rejects the connection.

It's the user that generates their own key pair not the server. The server doesn't send the private key to the user, as that would be a security risk. The private key should always remain on the user's computer and never be shared with anyone else.

Cheers!

Tiugo image

Fast, Lean, and Fully Extensible

CKEditor 5 is built for developers who value flexibility and speed. Pick the features that matter, drop the ones that don’t and enjoy a high-performance WYSIWYG that fits into your workflow

Start now

Top comments (0)

Jetbrains image

Is Your CI/CD Server a Prime Target for Attack?

57% of organizations have suffered from a security incident related to DevOps toolchain exposures. It makes sense—CI/CD servers have access to source code, a highly valuable asset. Is yours secure? Check out nine practical tips to protect your CI/CD.

Learn more

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay