1 #+TITLE: Creating a SSH-key for a new user
3 #+EMAIL: mdl AT imapmail DOT org
4 #+STARTUP: align fold nodlcheck hidestars oddeven lognotestate
5 #+SEQ_TODO: TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
6 #+TAGS: Write(w) Update(u) Fix(f) Check(c)
10 #+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:nil -:t f:t *:t TeX:t LaTeX:t skip:nil d:(HIDE) tags:not-in-toc
11 #+HTML_LINK_UP: index.html
12 #+HTML_LINK_HOME: https://orgmode.org/worg/
14 # This file is released by its authors and contributors under the GNU
15 # Free Documentation license v1.3 or later, code examples are released
16 # under the GNU General Public License v3 or later.
18 To push commits to the Worg repository at https://code.orgmode.org/bzg/worg you
19 need to have a SSH key. What's that and how can you create one?
21 * Public and private keys
26 A /public key/ is like a door lock, and a /private key/ is like the key.
27 =code.orgmode.org= is asking you for the /public key/, that means, they ask you
28 to provide a lock, and they will install your lock in their server.
29 Then, with your /private key/ you will be able to open a connection to
32 Your /private key/ may be easy to use: just /have it/, and you can use
35 But suppose you lose it; then it's not secure anymore; any person which
36 has the key (which is a file) can connect to the server supplanting your
39 Therefore, at the computer we do that the /private key/ has a /password/
40 (also called "passphrase"). Then, you do not only need to possess the
41 key to open the lock; you also need to know how to use it (that means,
42 you must have the /public key/ *and* know the password).
44 So: *use a passphrase* for more security.
46 * Steps to create your private and public keys
50 1. Run =ssh-keygen= with no parameters. If you want to change the
51 encryption algorithm used, see [[RSA or DSA?][the section below]].
53 2. /Location of the key/: just press enter
55 3. /Passphrase of the key/: enter your new password; the one you will
56 type each time to be able to connect. You can have no password at
57 all, but it's not recommended; read the description at the
58 introduction to know why.
60 4. Now you have 2 new files:
62 - =id_rsa=: that's your new private key. Don't share it!
64 - =id_rsa.pub=: that's your new /public key/. You can distribute it.
66 - You will also see a /fingerprint/ (like =31:c0:5a:92:70:5e:91=... etc).
68 5. Look at the public key. If you don't like the user name which appears
69 at the end, re-run =ssh-keygen -C "comment that you want" =
76 You can decide if at the key creation you want to use the algorithm RSA or
79 If you know which one you like, you're lucky; use it!
81 If not, decide one; both will work.
83 By default, =ssh-keygen= uses RSA, but you can use =ssh-keygen -t dsa= to