SSH (Secure Shell) is a cryptographic network protocol that allows secure communication between computers over a potentially insecure network. In Git, SSH enables safe authentication and encrypted communication with remote repositories like GitHub, GitLab, or Bitbucket.
SSH works using a public-private key pair. The public key is shared with the server, while the private key remains securely on your system.
// Generate a new SSH key pair
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
// Start the SSH agent
eval "$(ssh-agent -s)"
// Add your private key to the agent
ssh-add ~/.ssh/id_rsa
// Test SSH connection with GitHub
ssh -T git@github.com
Toggle light and dark mode using the button above to understand how UI themes enhance readability during development.