Your public key has been saved in /Users/jenny/.ssh/id_ed25519.pub. Your identification has been saved in /Users/jenny/.ssh/id_ed25519. Generating public/private ed25519 key pair.Įnter file in which to save the key (/Users/jenny/.ssh/id_ed25519):Įnter passphrase (empty for no passphrase): ssh directory, and copy the public key file to your clipboard by running: Windows cd userprofile/.ssh clip < ided25519.pub On macOS or Linux simply run the following in a terminal: Mac OS X pbcopy < /.ssh/ided25519. The process should complete now and should have looked like this: ~ % ssh-keygen -t ed25519 -C "jenny-2020-mbp" On Windows, in your command prompt, change directory to your. Enter passphrase (empty for no passphrase): I did not use a passphrase at first, but I do now, and record it in a password manager. If you’re completely new at all this, skip the passphrase and implement it next time, when you are more comfortable with system configuration. It is optional, but also a best practice.Ĭonfiguring your system for smooth operation with a passphrase-protected key introduces more moving parts. You have the option to protect the key with a passphrase. Just press Enter here: Enter file in which to save the key (/Users/jenny/.ssh/id_ed25519): If it appears that your system is too old to support the Ed25519 algorithm, do this instead: ssh-keygen -t rsa -b 4096 -C "DESCRIPTIVE-COMMENT"Īccept the proposal to save the key in the default location. ssh-keygen -t ed25519 -C "DESCRIPTIVE-COMMENT" For example, one public key for each computer you connect with.Ĭreate the key pair like so, but substitute a comment that means something to you, especially if you’ll have multiple SSH keys in your life.Ĭonsider the email associated with your GitHub account or the name of your computer or some combination, e.g. It is normal to associate multiple public keys with your GitHub account. Click and hold down the left mouse button to highlight the entire SSH key but do not highlight any spaces after your email address at the end of the SSH key.Some people even have one key per computer, per service (I do not do this). You should probably have one key per computer (I do this). Don’t do weird gymnastics in order to have only one key pair, re-used over multiple computers. Shell xxxxxxxxxx nano /.This can make setup and usage harder, so if you’re not up for that (yet), either don’t use a passphrase or seriously consider using HTTPS instead. It’s best practice to protect your private key with a passphrase.You should swap out your SSH keys periodically.You can use one method from computer A and the other from computer B. If you are new to programming and the shell, you’ll probably find HTTPS easier at first (chapter 9).Add your public key to your GitHub profile.If you protected it with a passphrase, you may have additional configuration. Add the private key to your ssh-agent.Optionally, encrypt the private key with a passphrase (best practice). Literally, 2 special files, in a special place.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |