[4] vsFTPd + SSL/TLS

2 lutego 2023 Wyłączono przez Adam [zicherka] Nogły

Poniższy przykład używa certyfikatów z auto podpisem utworzonych w  „Certyfikat z auto podpisem”. Zakładam także, że wcześniej skonfigurowano i przetestowano poprawne działanie serwera vsFTPd.
Konfigurujemy vsFTPd:

root@vfbsd01:~ # mcedit /usr/local/etc/vsftpd.conf
# dodajemy na końcu
rsa_cert_file=/usr/local/openssl/certs/vfbsd01.zicher.lab-cert.pem
rsa_private_key_file=/usr/local/openssl/certs/vfbsd01.zicher.lab-unencrypted-key.key
ssl_enable=YES
force_local_data_ssl=YES
force_local_logins_ssl=YES

Restartujemy serwer FTP:

root@vfbsd01:~ # /usr/local/etc/rc.d/vsftpd restart

No i teraz połączymy się za pomocą sftp z serwerem vsFTPd:

fbsduser@vfbsd01:~ $ sftp fbsduser@localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established.
ED25519 key fingerprint is SHA256:ellQAz+X7sf+yqURAnKFs6BKUEj+DfkbOUt/p4y1lJI.
No matching host key fingerprint found in DNS.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes # wpisz [yes]
Warning: Permanently added 'localhost' (ED25519) to the list of known hosts.
(fbsduser@localhost) Password for fbsduser@vfbsd01.zicher.lab: # wpisz hasło
Connected to localhost.
sftp> ls
public_html
sftp> bye
fbsduser@vfbsd01:~ $