Skip to content
kimschles edited this page Jan 2, 2019 · 4 revisions

SSH

Vocabulary

  • 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 for ssh-add to work

Helpful Commands

  • 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 background

    • eval "$(ssh-agent -s)"
  • Create a public key using a private key that lives in a file

    • ssh-keygen -y -f <private key> > <public key>
Clone this wiki locally