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 =Repo.or.cz= 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
86 * Appendice: How to use this key to create an account on =repo.or.cz=?
88 *Note*: this section was useful when worg.git was hosted on =repo.or.cz=
89 instead of =orgmode.org=, before december 2011. We leave it here, so that
90 it is useful for other project than Worg.
92 1. Copy and paste the /public/ key (the contents of =id_rsa.pub=) in the
93 text box in http://repo.or.cz/reguser.cgi
95 2. In "/login/", write the user name you want to have in this server
97 3. Write also your e-mail
99 4. Click the button "/Register/"
101 5. Now you must ask the administrator to give you "push"-access: to
102 allow you to upload contents to the project.
104 6. If you chose a user name for =repo.or.cz= that is different than your
105 login name, you might adjust the ssh client to use the user name for
106 =repo.or.cz= name when connecting.
108 This can be done by putting two lines like these in the file
113 User <user at repo.or.cz>
116 # ----------------------------
118 # Started at 11.12.2007 by Daniel Clemente. This text is in the public domain.