You are browsing a read-only backup copy of Wikitech. The primary site can be found at wikitech.wikimedia.org
Generate an SSH Key
This page contains information about generating a public SSH Key
This page contains information about generating a public SSH Key. If you are generating a key for production access, please see SRE/Production access#Generating your SSH key.
Generate an SSH key
1) Enter the following in the terminal. Use the email you wish to associate with the SSH Key, and then press enter.
ssh-keygen -t rsa -C "email@example.com"
2) When prompted
Enter file in which to save the key, click enter to choose the default.
3) Type a secure passphrase, and click enter.
4) Retype the secure passphrase, and click enter.
The terminal will display information about the files your identification and public key will be saved in.
~/.ssh/id_rsa - identification (private) key
~/.ssh/id_rsa.pub - public key
A fingerprint and randomart image for the key will be generated.
Add or Change a passphrase
Add or change the SSH passphrase using this command:
1) Enter the following into your terminal
$ ssh-keygen -p, and click enter.
2) When prompted
Enter file in which the key is (/Users/you/.ssh/id_rsa):, and click enter.
3) Enter your old passphrase, and click enter.
4) Enter the same passphrase again, and click enter.
our identification has been saved with the new passphrase.
- Make sure to choose a passphrase. Do not leave it empty.
ssh-agentcan be used to store your passphrase securely, so you do not have to re-enter it.
- Mac OS X Leopard or later and Linux users SSH can save their passphrase in the system's keychain.