zoukankan      html  css  js  c++  java
  • Ftps搭建部署

    FTP+SSL 实现Ftps


    操作系统:Centos7 直接实现一个包括私钥和证书的文件
    首先安装好vsftpd包 yum -y install vsftpd
    ldd `which vsftpd` | grep libssl 查看是否支持SSL
    [root@centos7-1 ~]$mkdir /etc/vsftpd/ssl
    [root@centos7-1 ~]$cd /etc/pki/tls/certs/
    [root@centos7-1 certs]$make /etc/vsftpd/ssl/vsftpd.pem
    [root@centos7-1 certs]$ll /etc/vsftpd/ssl/vsftpd.pem
    -rw------- 1 root root 3011 Sep 13 15:27 /etc/vsftpd/ssl/vsftpd.pem
    [root@centos7-1 certs]$openssl x509 -in /etc/vsftpd/ssl/vsftpd.pem -noout -text
    [root@centos7-1 ssl]$vim /etc/vsftpd/vsftpd.conf
    ssl_enable=YES #启用SSL
    allow_anon_ssl=NO #匿名不支持SSL
    force_local_logins_ssl=YES #本地用户登陆加密
    force_local_data_ssl=YES #本地用户数据传输加密
    rsa_cert_file=/etc/vsftpd/ssl/vsftpd.pem #一个证书和私钥两个的文件
    [root@centos7-1 ssl]$systemctl restart vsftpd #重启服务,生效配置文件

    操作系统:Centos8 手动生成一个证书和私钥文件,再合并成一个文件
    首先安装好vsftpd包 yum -y install vsftpd
    ldd `which vsftpd` | grep libssl 查看是否支持SSL
    [root@centos8-1 ~]$mkdir /etc/vsftpd/ssl
    [root@centos8-1 ~]$cd /etc/vsftpd/ssl
    [root@centos8-1 ssl]$openssl req -x509 -nodes -keyout vsftpd.key -out vsftpd.crt -days 365 -newkey rsa:2048
    [root@centos8-1 ssl]$cat vsftpd.crt vsftpd.key > vsftpd.pem
    [root@centos8-1 ssl]$vim /etc/vsftpd/vsftpd.conf
    ssl_enable=YES #启用SSL
    allow_anon_ssl=NO #匿名不支持SSL
    force_local_logins_ssl=YES #本地用户登陆加密
    force_local_data_ssl=YES #本地用户数据传输加密
    rsa_cert_file=/etc/vsftpd/ssl/vsftpd.pem #一个证书和私钥两个的文件
    [root@centos8-1 ssl]$systemctl restart vsftpd #重启服务,生效配置文件

    使用工具连接测试 

     

    把生命浪费在美好的事物上
  • 相关阅读:
    MySql使用游标Cursor循环(While)更新数据
    初试TinyIoCContainer笔记
    用Razor做静态页面生成器
    在CentOS6.5上安装MariaDB
    mono的远程调试
    mono3.2.3+Jexus5.5+openSuSE13.1的asp.net
    mono3.2和monodevelop4.0在ubuntu12.04上两天的苦战
    第一节知识点:.net与c#的概念
    支付宝支付功能(使用支付宝sdk)
    vs2017/vs2019 去掉 单击aspx文件预览页面
  • 原文地址:https://www.cnblogs.com/tz66/p/13661710.html
Copyright © 2011-2022 走看看