标签: ftps

实现ftps的Python模块

我想知道是否有人可以指向python的免费ftps模块.

我是python的全新手,但这是我工作项目所需要的.我需要一个ftps客户端连接到第三方ftps服务器.

谢谢,

大卫.

python ftps

9
推荐指数
3
解决办法
8852
查看次数

cURL - 使用cURL来ftp文件并保留文件的原始时间戳

我使用curl从FTPS站点下载一些文件.当我将文件从站点下载到我的机器时,zip文件日期会更改为下载时间和日期.我想保留FTPS服务器上的原始时间戳.请告知如何做到这一点.如果你能提供gr8的例子我是新来的卷曲.

谢谢

curl timestamp file ftps

9
推荐指数
1
解决办法
9395
查看次数

如何通过Java中的TLS/SSL(FTPS)服务器连接到FTP

我搜索了SO,谷歌搜索超过2天,没有找到任何帮助我的答案.

我无法通过TLS/SSL(FTPS)服务器连接到FTP.我正在使用SimpleFTP库,因为我可以连接没有SSL的FTP服务器,但无法连接FTPS.

它在第2行(ftp.connect)给我这个错误,

连接到FTP服务器时,SimpleFTP收到未知响应:
220 ----------欢迎使用Pure-FTPd [privsep] [TLS] ----------

我正在使用下面的代码

SimpleFTP ftp = new SimpleFTP();

// Connect to an FTP server on port 21.
ftp.connect("xxx.xxx.xxx.xxx", 21, "username", "pwd");
//getting error at (ftp.connect) above line

// Set binary mode.
ftp.bin();

// Change to a new working directory on the FTP server.
ftp.cwd("web");
ftp.disconnect();
Run Code Online (Sandbox Code Playgroud)

java ftp ssl ftps

8
推荐指数
1
解决办法
3万
查看次数

如何在使用FtpWebRequest时覆盖服务器证书验证?

HttpWebRequest.ServerCertificateValidationCallback 允许您在使用HTTPS时覆盖服务器证书验证的逻辑.

没有相同的财产FtpWebRequest.

使用时如何覆盖服务器证书验证FtpWebRequest

我知道ServicePointManager.ServerCertificateValidationCallback,但我正在寻找一个只会影响当前FtpWebRequest对象的解决方案.

c# ssl certificate ftps

8
推荐指数
0
解决办法
220
查看次数

commons-net与ssh-2.0协议兼容

我尝试用库commons.net创建一个项目,通过ftp发送一些文件.但我创建了与我的服务器的连接我收到此错误.

org.apache.commons.net.MalformedServerReplyException: Could not parse response code.
Server Reply: SSH-2.0-OpenSSH_5.3
Run Code Online (Sandbox Code Playgroud)

我已经按照这篇文章创建了我的连接,并且通过官方示例我已经控制了文章.

我的java代码在这里:

  private void connect(String host, String user, String pwd) {
        try{
        ftp = new FTPSClient(false);
        //ftp.addProtocolCommandListener(new PrintCommandListener(new PrintWriter(System.out)));
        int reply;

        ftp.connect(host,22);//error is here
        reply = ftp.getReplyCode();
        if (!FTPReply.isPositiveCompletion(reply)) {
            ftp.disconnect();
            throw new Exception("Exception in connecting to FTP Server");
        }
        ftp.login(user, pwd);
        ftp.setFileType(FTP.BINARY_FILE_TYPE);
        ftp.enterLocalPassiveMode();
        }catch(Exception ex){
            ex.printStackTrace();
        }
    }
Run Code Online (Sandbox Code Playgroud)

我不明白我哪里出错了.

java ssh ftps apache-commons-net

7
推荐指数
1
解决办法
2万
查看次数

如何让lftp从命令行使用SSL/TLS安全机制?

我正在尝试登录ftps网站.我已经尝试在命令行中输入登录信息(并将set参数放入~/.lftprc,然后打开lftp会话并使用lftp作业控制语句键入这些参数.无论如何,我一直遇到相同的障碍:

 421 Sorry, cleartext sessions are not accepted on this server.
 Please reconnect using SSL/TLS security mechanisms.
Run Code Online (Sandbox Code Playgroud)

我得到了以下参数最远,但不断得到上面的错误.

如何lftp从命令行使用SSL/TLS安全机制?

目标是使用bash(不使用编程expect)编写对此ftps站点的访问的脚本.

 lftp
 lftp :~> set ssl-allow false
 lftp :~> set passive-mode yes
 lftp :~> open ftp.abc.com
 lftp ftp.abc.com:~> login theuser
 Password:
 lftp theuser@ftp.abc.com:~> cd
  `cd' at 0 [Delaying before reconnect: 26]
 CTRL-C
 lftp theuser@ftp.abc.com:~> debug
 lftp theuser@ftp.abc.com:~> cd
 ---- Connecting to ftp.abc.com (XX.XXX.XX.XX) port 21
 <--- 220-Welcome …
Run Code Online (Sandbox Code Playgroud)

ftp ubuntu ftps lftp

7
推荐指数
4
解决办法
5万
查看次数

SSH 主机密钥指纹与模式 C# WinSCP 不匹配

我正在尝试通过 WinSCP 使用 C# 连接到 FTPS 服务器,但出现此错误:

SSH 主机密钥指纹...与模式不匹配...

经过大量研究,我认为这与密钥的长度有关。在“服务器和协议信息”下使用其接口连接时,我从 WinSCP 获得的密钥是xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx 但我在示例中看到的密钥 更短,如下所示xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx

有人可以帮助我并为我提供解决此问题的任何指示,将不胜感激。

这是我的代码

string winscpPath = "C:\\Program Files (x86)\\WinSCP\\WinSCP.exe";
string username = "User123";
string password = "abc1234";
string ftpSite = "192.168.5.110";
string localPath = "C:\\Users\\ttom\\Documents";
string remoteFTPDirectory = "/Usr/thisfolder";
string sshKey = "1b:68:10:80:77:c6:65:91:51:31:5t:65:1c:g6:13:20:39:g8:d8:6d";
Boolean winSCPLog = true;
string winSCPLogPath = "C:\\Users\\ttom\\Documents\\Visual Studio 2015\\Projects\\WebApplication1\\WebApplication1";

SessionOptions sessionOptions = new SessionOptions
{
    Protocol = Protocol.Sftp,
    HostName = ftpSite,
    UserName = username,
    Password = password,
    SshHostKeyFingerprint = sshKey
}; …
Run Code Online (Sandbox Code Playgroud)

c# ftp ftps winscp winscp-net

7
推荐指数
3
解决办法
1万
查看次数

使用FTPS将文件从android传输到服务器

我在我的Android应用程序中使用Apache Commons FTP库

我通过FTPS建立连接,虽然它与服务器完美连接,但在传输文件时遇到问题.

出于安全原因,订购应用程序的客户端在使用PROT P时请求在数据连接上恢复TLS会话.

因此,我在服务器上启用了此选项:

在此输入图像描述

正如我所说,我可以连接到服务器,但不能传输文件. 如果我取消激活"使用PROT P时数据连接上所需的TLS会话恢复"框,则传输正常.

我正在寻找一种使用库进行文件传输的方法,但是没有成功,我知道必须有一种方法.

我给你相关代码的一部分:

TransferImagenesFTP.ftpClient = new FTPSClient();

TransferImagenesFTP.ftpClient.connect(InetAddress.getByName("XXX_XXX_XX_X"), 26);
TransferImagenesFTP.ftpClient.enterLocalPassiveMode();
TransferImagenesFTP.ftpClient.setBufferSize(1024000);
TransferImagenesFTP.ftpClient.login("xxxxxx", "zzzzzz");
TransferImagenesFTP.ftpClient.execPROT("P");
TransferImagenesFTP.ftpClient.type(FTP.BINARY_FILE_TYPE);
Run Code Online (Sandbox Code Playgroud)

我感谢任何帮助,谢谢.

java android ftp-client ftps apache-commons-net

7
推荐指数
1
解决办法
1222
查看次数

FTPES - 需要会话重用

所以,我正在尝试连接到ftp服务器以获取目录列表和下载文件.但是prot_p()函数之后的第一个命令引发了异常 - 从日志中产生这些错误:

*get* '150 Here comes the directory listing.\r\n'
*resp* '150 Here comes the directory listing.'
*get* '522 SSL connection failed; session reuse required: see require_ssl_reuse
option in vsftpd.conf man page\r\n'
*resp* '522 SSL connection failed; session reuse required: see require_ssl_reuse
 option in vsftpd.conf man page'
Traceback (most recent call last):
  File "C:\temp\download.py", line 29, in <module>
    files = ftps.dir()
  File "C:\Python27\lib\ftplib.py", line 522, in dir
    self.retrlines(cmd, func)
  File "C:\Python27\lib\ftplib.py", line 725, in retrlines
    return self.voidresp()
  File "C:\Python27\lib\ftplib.py", line …
Run Code Online (Sandbox Code Playgroud)

python ftp ftps ftplib python-2.7

6
推荐指数
2
解决办法
4798
查看次数

除非我在退出之前插入睡眠,否则System.Net.FtpClient openwrite不会上传文件

我正在使用System.Net.FtpClient程序集将文件上载到测试FTP站点.当我运行下面的代码时,文件不会出现在远程位置,除非我使用Thread.Sleep如下所示(我不想使用):

using System;
using System.IO;
using System.Net;
using System.Net.FtpClient;
using System.Security.Cryptography.X509Certificates;
using System.Threading;

namespace FtpsUploadTest
{
    /// <summary>
    /// The ftp publisher.
    /// </summary>
    public class FtpPublisher
    {
        private readonly FtpsSettings _settings;
        private readonly IFtpClient _ftpClient;

        /// <summary>
        /// Initializes a new instance of the <see cref="FtpPublisher"/> class.
        /// </summary>
        public FtpPublisher()
        {
            _ftpClient = new FtpClient();
            _settings = SettingsReader.GetMySettings();
            Init();
        }


        /// <summary>
        /// The publish.
        /// </summary>
        /// <param name="fileToUpload">
        /// The input file path.
        /// </param>
        public …
Run Code Online (Sandbox Code Playgroud)

c# ftps

6
推荐指数
1
解决办法
1718
查看次数