Skip to content

Commit cd5c748

Browse files
authored
Merge pull request #1099 from peterwwillis/master
Update ssh-keygen with secure password encryption
2 parents 6044422 + cb99cc0 commit cd5c748

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

book/04-git-server/sections/generating-ssh-key.asc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ If you don't have these files (or you don't even have a `.ssh` directory), you c
2323

2424
[source,console]
2525
----
26-
$ ssh-keygen
26+
$ ssh-keygen -o
2727
Generating public/private rsa key pair.
2828
Enter file in which to save the key (/home/schacon/.ssh/id_rsa):
2929
Created directory '/home/schacon/.ssh'.
@@ -36,6 +36,8 @@ d0:82:24:8e:d7:f1:bb:9b:33:53:96:93:49:da:9b:e3 [email protected]
3636
----
3737

3838
First it confirms where you want to save the key (`.ssh/id_rsa`), and then it asks twice for a passphrase, which you can leave empty if you don't want to type a password when you use the key.
39+
However, if you do use a password, make sure to add the `-o` option.
40+
You can also use the `ssh-agent` tool to prevent having to enter the password each time.
3941

4042
Now, each user that does this has to send their public key to you or whoever is administrating the Git server (assuming you're using an SSH server setup that requires public keys).
4143
All they have to do is copy the contents of the `.pub` file and email it.

0 commit comments

Comments
 (0)