SSH is a foundational topic for anyone working on the web, and at a minimum
it's important to understand how SSH is used for authentication with Git and
similar tools. In this episode we'll cover these basics as well as some of the
more interesting tricks we can pull off using SSH.
In the video, Chris mentions that the local SSH agent will sign things using the private key but the video’s transcript states that the local SSH agent will encrypt the message using your public key.
I would appreciate a little clarification on the subject.
hey Chris just watched your video on ssh. When trying to access ~/.ssh/id_rsa.pub or ~/.ssh/known_hosts through my console I always get zsh: permission denied: /Users/davidgeismar/.ssh/known_hosts. Do you happen to know how to bypass that ?
Hi @gnerkus, I believe the specifics are actually more subtle. The initial exchange between a server and a user will involve asymmetric encryption using public keys to exchange a shared secret. This secret key will then be used for all subsequent communication, via symmetric encryption. The Public-key cryptography covers this far better than I could hope to.
That said, in day to day use the specifics of the encryption algorithm and approach are details that we can safely look past. The only hard and fast rule is to never share your private key.
@davidgeismar, I think you have a permissions issue with the ~/.ssh directory. I believe you should be able to use chown to fix this. Check out this answer for more detail, but I believe you should be able to run the following (filling in your actual OS username for <username>: