Creating a passphrase for my ssh key on GitHub

I'm trying to set up a GitHub account, and every time I get to enter a passphrase for my SSH key, my terminal freezes. Here are my steps:

Parkers-MacBook-Pro: ~ ppreyer $ ssh-keygen -t rsa -C Parker.preyer1@gmail.com Creating a public / private rsa key pair. Enter the file to save the key (/Users/ppreyer/.ssh/id_rsa): (/Users/ppreyer/.ssh/id_rsa): The directory '/Users/ppreyer/.ssh' has been created. Enter your passphrase (blank for passphrase): (DO NOT TAKE ANYTHING FOR ME)

Anyone else run into this problem?

+2
github ssh-keys github-for-mac
source share
2 answers

You are running on a UNIX compatible machine. Therefore, most terminal-based password entry mechanisms use what is called a โ€œUnix password fieldโ€ (as far as I know, this is the most common name for it). In fact, you do not see the characters that you print, but they are. Just make sure you type the same thing twice and you have to be good.

Try it, enter your password and press Enter. Type it again and press Enter again. You have just created the SSH passphrase.

+2
source share

I agree with MaxMackie's answer (upvoted), but I also like to generate my ssh keys non-interactively:

[space]ssh-keygen -t rsa -f "${H}/.ssh/myKey" -C "Gitolite Admin access (not interactive)" -q -P "xxxx" 

This generates the private ssh key mykey 'and the public ssh key < mykey.pub ' in my ~/.ssh .

Pay attention to the space before the command in order to avoid recording of this command in the bash history in my bash session (since I defined a HISTCONTROL=ignorespace , as in the section Execute a terminal command without saving its .bash_history in OS X? ")

+2
source share

All Articles