File: simple-cert.txt

package info (click to toggle)
linux-ftpd-ssl 0.17.36%2B0.3-2.2
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 2,524 kB
  • sloc: ansic: 3,875; yacc: 1,379; sh: 52; makefile: 48
file content (28 lines) | stat: -rw-r--r-- 748 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
This is a simple procedure to arrive at a SSL certificate
allowing a quick start of ftpd-ssl.

1. Generate an RSA key file:

  $ openssl genrsa -out /run/shm/ftpd.key

2. Generate a self-signed certificate:

  $ openssl req -config /etc/ftpd-ssl/openssl.cnf \
                -new  -x509  -days 100 \
                -key /run/shm/ftpd.key \
		-out /etc/ftpd-ssl/ftpd.tmp

  A fair number of question will have to be answered in order
  to produce a valid certificate.

3. Set up a combined file at the default location:

  $ cat /run/shm/ftpd.tmp /run/shm/ftpd.key > /run/shm/ftpd.pem

  $ sudo cp /run/shm/ftpd.pem /etc/ftpd-ssl/

  $ sudo chmod 0600 /etc/ftpd-ssl/ftpd.pem

  $ rm /run/shm/ftpd.*

Now the ftpd should be able to start properly.