SSH - kimschles/schlesinger-knowledge GitHub Wiki
- SSH stands for Secure SHell
- SSH is a remote login program
- SSH uses port 22 to connect your computer to another computer
- The ssh-agent is a program that holds private keys used for public key authentication. See: https://linux.die.net/man/1/ssh-agent
-
$SSH_AUTH_SOCK
is an env variable required forssh-add
to work
-
SSH into an ubuntu server on port 2222
ssh -i <key> ubuntu@<address> -p 2222 -vvvv
-
Add your rsa_id or dsa_id to the
ssh-agent
ssh-add
-
Delete all identities from the agent:
ssh-add -D
-
Add an identity to the
ssh-agent
and store the passprhase in your keychain.ssh-add -K ~/.ssh/id_rsa
-
Start the
ssh-agent
in the backgroundeval "$(ssh-agent -s)"
-
Create a public key using a private key that lives in a file
ssh-keygen -y -f <private key> > <public key>