

The passphrase is an extra layer of security on your private key. Next you can opt to encrypt your private key with a passphrase. So when we say ~/.ssh, that means /Users/YOU/.ssh. Also! The tilde ( ~) is filesystem shorthand for your user’s home folder. ssh folder in the Finder, press Command+Shift+G, then enter ~/.ssh. Nerd Stuff! The Finder in macOS keeps that. Hit Return to create a keypair using the default name id_rsa and put it in the. For now we’ll just stick with the defaults. The first decision to make is where to keep your key, and what to call it. Press Return, and you’ll see this: Generating public/private rsa key pair.Įnter file in which to save the key (/Users/YOU/.ssh/id_rsa): Everything after the $ is a command to be entered. Open a Terminal window and enter the following command: $ ssh-keygen -t rsa -b 4096 If you’re on a Mac, we can generate your keypair from the command line. If you’re using Transmit 5, Code Editor, Transmit for iOS, or Prompt, you can generate keypairs from inside the app. Don’t have any keys? Not to worry, we can generate them. Did your server provide you with keys? Great! Let’s skip down a bit. Anyone with access to the public key can use it to encrypt information, which can only be decrypted using the corresponding private key.įirst, we need some keys to use. Instead of a password, you have a pair of matched keys: one public, and one private. Key-based authentication is a huge improvement over a simple username and password combination. Use Keys, Not Passwordsįortunately for us, SSH allows connections to be authenticated using keys. Because they’re so hard to remember, it’s tempting to use the same password everywhere, which means you have to change all your passwords if just one login gets compromised. A secure password is a long, meaningless string containing a mix of letters, numbers, and symbols. Passwords are notoriously hard to remember, yet easy for attackers to break.
