Ubuntu 22.04
Sponsored Link

FTP : Vsftpd Over SSL/TLS2023/09/15

 
SSL/TLS का उपयोग करने के लिए Vsftpd कॉन्फ़िगर करें।
[1] स्व-हस्ताक्षरित प्रमाणपत्र बनाएं.
तथापि। यदि आप Let's Encrypt या अन्य जैसे वैध प्रमाणपत्रों का उपयोग करते हैं, तो आपको इसे बनाने की आवश्यकता नहीं है।
root@www:~#
cd /etc/ssl/private

root@www:/etc/ssl/private#
openssl req -x509 -nodes -newkey rsa:2048 -keyout vsftpd.pem -out vsftpd.pem -days 3650

Generating a RSA private key
.........+++++
.......+++++
writing new private key to 'vsftpd.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:JP                            # कंट्री कोड
State or Province Name (full name) [Some-State]:Hiroshima       # राज्य
Locality Name (eg, city) []:Hiroshima                           # शहर
Organization Name (eg, company) [Internet Widgits Pty Ltd]:GTS  # कंपनी
Organizational Unit Name (eg, section) []:Server World          # विभाग
Common Name (e.g. server FQDN or YOUR name) []:www.srv.world    # सर्वर का FQDN
Email Address []:root@srv.world                                 # व्यवस्थापक का ईमेल

root@www:/etc/ssl/private#
chmod 600 vsftpd.pem

[2] Vsftpd कॉन्फ़िगर करें।
root@www:~#
vi /etc/vsftpd.conf
# पंक्ति 149 : इस प्रकार परिवर्तन करें

rsa_cert_file=
/etc/ssl/private/vsftpd.pem

rsa_private_key_file=
/etc/ssl/private/vsftpd.pem

ssl_enable=
YES

ssl_ciphers=HIGH
force_local_data_ssl=YES
force_local_logins_ssl=YES
root@www:~#
systemctl restart vsftpd

FTP क्लाइंट : Ubuntu
 
FTPS कनेक्शन का उपयोग करने के लिए FTP क्लाइंट को कॉन्फ़िगर करें।
[3] Ubuntu पर FTP क्लाइंट स्थापित करें और निम्नानुसार कॉन्फ़िगर करें।
ubuntu@client:~$
vi ~/.lftprc
# नया निर्माण

set ftp:ssl-auth TLS
set ftp:ssl-force true
set ftp:ssl-protect-list yes
set ftp:ssl-protect-data yes
set ftp:ssl-protect-fxp yes
set ssl:verify-certificate no
ubuntu@client:~$
lftp -u ubuntu www.srv.world

Password:
lftp ubuntu@www.srv.world:~>
FTP क्लाइंट : Windows
[4] Windows पर के उदाहरण के लिए, [फ़ाइल] - [साइट प्रबंधक] खोलें।
[5] इनपुट कनेक्शन जानकारी इस प्रकार है, और एन्क्रिप्शन फ़ील्ड के लिए, [टीएलएस पर स्पष्ट FTP की आवश्यकता है] चुनें।
[6] उपयोगकर्ता का पासवर्ड आवश्यक है. इसे इनपुट करें।
[7] यदि आप स्व-हस्ताक्षरित प्रमाणपत्र सेट करते हैं, तो निम्नलिखित चेतावनी दिखाई देती है, यह कोई समस्या नहीं है। अगले जाओ।
[8] यदि सेटिंग्स ठीक हैं, तो निम्नानुसार FTPS के साथ FTP सर्वर से कनेक्ट करना संभव है।
मिलान सामग्री