我正在尝试连接到FTPS服务器(而不是SFTP).我从Linux系统连接,所以我尝试了lftp,ftp-ssl,甚至使用php的ftp_ssl_connect,但它们都没有用.(我已经能够使用所有或至少一些上述方法连接到其他FTPS服务器).
我遇到的最具描述性的错误是从lftp到调试一直到11:
$ lftp lftp :~> open -u my-username ftps://server.net Password: lftp my-username@server.net:~> debug 99999999999 lftp my-username@server.net:~> ls FileCopy(0x717bf0) enters state INITIAL FileCopy(0x717bf0) enters state DO_COPY ---- dns cache hit ---- Connecting to server.net (IP ADDRESS) port 990 GNUTLS: HSK[acfbb0]: Keeping ciphersuite: DHE_RSA_AES_128_CBC_SHA1 GNUTLS: HSK[acfbb0]: Keeping ciphersuite: DHE_RSA_CAMELLIA_128_CBC_SHA1 GNUTLS: HSK[acfbb0]: Keeping ciphersuite: DHE_RSA_AES_256_CBC_SHA1 GNUTLS: HSK[acfbb0]: Keeping ciphersuite: DHE_RSA_CAMELLIA_256_CBC_SHA1 GNUTLS: HSK[acfbb0]: Keeping ciphersuite: DHE_RSA_3DES_EDE_CBC_SHA1 GNUTLS: HSK[acfbb0]: Keeping ciphersuite: DHE_DSS_AES_128_CBC_SHA1 GNUTLS: HSK[acfbb0]: Keeping ciphersuite: DHE_DSS_CAMELLIA_128_CBC_SHA1 GNUTLS: HSK[acfbb0]: Keeping ciphersuite: DHE_DSS_AES_256_CBC_SHA1 GNUTLS: HSK[acfbb0]: …
Visual Studio 2010允许通过FTP发布Web项目.功能强大但由于安全原因,FTP在目标站点被禁用(FTPS可用).据我所知VS2010不支持FTPS;(VS2010是否有任何实现FTPS支持的插件?或者,也许是在本地PC上安装将FTP转换为FTPS的简单代理?
谢谢!
好的.所以我的网站托管在InmotionHosting上.这是一个共享服务器,所以ssh已经出局了.我一直在通过FTPS访问它.我在工作中使用git,所以我很想开始在我的个人网站上使用git.只是问题,我不确定如何使用git连接到我当前的站点.我知道它与ftps兼容,因为它在手册中,但我收到错误:
"无法连接到[我的网站]""无法解析主机""致命:HTTP请求失败""错误访问[我的网站]/info/refs"
我试过了:
git clone [username]:[pass] @ [site] [local repository]
git clone [username] @ [site] [本地存储库]
git clone [username] @ [site]:[来自cpanel的端口] [本地存储库]
git clone [username]%40 [site] @ [site] [local repository]
什么都行不通.有什么我想念的吗?我需要在服务器上安装一些东西吗?任何帮助表示赞赏.谢谢!
我很难设置到FTPS的连接.
我应该使用SSL/TLS和AUTH(显式标准)进行连接.我有一个服务器地址和一个端口(:60000)和一个来自服务器所有者的公钥以及我自己的证书.
谷歌搜索后我认为卷曲是我最好的选择,但我真的不知道使用什么卷曲选项.
有没有人在一个片段上有一个工作示例,它连接并上传/下载文件到这样的FTPS?
这个页面有一些信息http://php.net/manual/en/function.curl-setopt.php 例如,同样的想法,但使用用户名/密码
$username = 'username';
$password = 'password';
$url = 'example.com';
$ftp_server = "ftp://" . $username . ":" . $password . "@" . $url;
echo "Starting CURL.\n";
$ch = curl_init();
echo "Set CURL URL.\n";
//curl FTP
curl_setopt($ch, CURLOPT_URL, $ftp_server);
//For Debugging
//curl_setopt($ch, CURLOPT_VERBOSE, TRUE);
//SSL Settings
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_FTP_SSL, CURLFTPSSL_TRY);
//List FTP files and directories
curl_setopt($ch, CURLOPT_FTPLISTONLY, TRUE);
//Output to curl_exec
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
echo "Executing CURL.\n";
$output = curl_exec($ch); …Run Code Online (Sandbox Code Playgroud) 我有一些问题与我们运行过夜的dos文件将一些文件发送到另一家公司的ftp服务器,另一家公司检查了他们的日志,我们正在连接并且能够登录但是没有文件被转移.我想知道使用put命令和send命令之间是否存在差异.新旧系统不支持其中一种吗?
我刚刚开始一个项目,我将需要使用FTPS连接到第三方服务器.他们将向我们提供我尚未拥有的证书,因此我将创建自己的开发环境以便开始使用.我使用Alex FTPS客户端作为我的起点(http://ftps.codeplex.com/)...但我也愿意将WinSCP用作其他客户端.
我的问题如下: - 如何在.Net中验证证书?
已完成的步骤
已安装和配置的FileZilla Server
使用FileZilla创建了自签名证书
private static bool ValidateTestServerCertificate(
object sender,
X509Certificate certificate,
X509Chain chain,
SslPolicyErrors sslPolicyErrors)
{
// what goes here?
}
Run Code Online (Sandbox Code Playgroud)
我的(各种问题)是:
假设进入该方法是什么?
我只对证书有一点了解.FileZilla自生成证书甚至是X509证书吗?我必须承认,我不知道不同类型的证书格式.
我写什么类型的代码?当我在WCF或HTTP中使用SSL时,已经为我处理了很多管道.这不是FTPS的情况吗?即我将使用Windows中的MMC管理单元导入或安装证书.
如果我没有在Alex FTPS中实现Callback方法,我收到消息:"远程证书根据验证程序无效"
感谢您提供任何提示和指示
我有一个CreateFTPConnection类,它创建一个FTPS连接.使用此连接,传输文件.这是TransferFile类的代码
public class TransferFile
{
private CreateFTPConnection ftpConnection;
private FTPSClient client;
public TransferFile(CreateFTPConnection ftpConnection) {
this.ftpConnection = ftpConnection;
this.client = ftpConnection.getClient();
}
public void transfer(Message<?> msg)
{
InputStream inputStream = null;
try
{
if(!client.isConnected()){
ftpConnection.init();
client = ftpConnection.getClient();
}
File file = (File) msg.getPayload();
inputStream = new FileInputStream(file);
client.storeFile(file.getName(), inputStream);
client.sendNoOp();
} catch (Exception e) {
try
{
client.disconnect();
}
catch (IOException e1) {
e1.printStackTrace();
}
}
finally
{
try {
inputStream.close();
}
catch (IOException e) {
e.printStackTrace();
}
} …Run Code Online (Sandbox Code Playgroud) 这是我的计划:
Application.FTP.Host:= vHost;
Application.FTP.Port:= vPort;
try
Application.FTP.AutoLogin := false;
Application.FTP.Connect;
Application.FTP.IOHandler.RecvBufferSize := 2048;
Run Code Online (Sandbox Code Playgroud)
我TIdFTP在Delphi XE3中使用组件.
我想我必须使用这样的东西......
Application.FTP.UseTLS := utUseRequireTLS;
Run Code Online (Sandbox Code Playgroud)
但是编译器不喜欢那条线
如何让我的FTP应用程序使用FTPS?
首先,我知道这里有一个类似的问题,但它并没有回答我的疑问。我有一个配置了 SSL 的 FTPS 服务器 (vsftpd)。
我已经生成了适当的密钥:
openssl req -x509 -nodes -days 1825 -newkey rsa:2048 \
-keyout private/vsftpd.key \
-out certs/vsftpd.crt
Run Code Online (Sandbox Code Playgroud)
并在服务器中配置了相应的conf文件。
现在,在使用 Apache commons net 的 Java 客户端代码中,我可以通过 SSL 与服务器进行通信,如下所示:
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import org.apache.commons.net.PrintCommandListener;
import org.apache.commons.net.ftp.FTP;
import org.apache.commons.net.ftp.FTPReply;
import org.apache.commons.net.ftp.FTPSClient;
public class CommonsNetFTPSTest {
public static void main(String[] args) throws Exception {
System.setProperty("javax.net.debug", "ssl");
String server = "XXX.XXX.XXX.XXX";
String username = "USER_TEST";
String password = "ABCD1234";
String remoteFile = "/Data/Input/PH240819";
String localFile = …Run Code Online (Sandbox Code Playgroud) 我正在尝试通过协议 TLS 通过 ftps 将文件上传到 FileZilla 服务器。服务器上的端口 20 和 21 已关闭。我设法连接到服务器的唯一方法是使用 FluentFTP,但由于某些 FileZilla 服务器错误,我无法上传文件。
https://github.com/robinrodricks/FluentFTP/issues/335
https://forum.filezilla-project.org/viewtopic.php?t=51601
public static void UploadTest(
string pathUploadFile, string addressIP, int port, string location,
string userName, string password)
{
FtpClient ftp;
Console.WriteLine("Configuring FTP to Connect to {0}", addressIP);
ftp = new FtpClient(addressIP, port, new NetworkCredential(userName, password));
ftp.ConnectTimeout = 600000;
ftp.ReadTimeout = 60000;
ftp.EncryptionMode = FtpEncryptionMode.Implicit;
ftp.SslProtocols = SslProtocols.Default | SslProtocols.Tls11 | SslProtocols.Tls12;
ftp.ValidateCertificate += new FtpSslValidation(OnValidateCertificate);
ftp.Connect();
// upload a file
ftp.UploadFile(pathUploadFile, location);
Console.WriteLine("Connected to {0}", …Run Code Online (Sandbox Code Playgroud) ftps ×10
ftp ×3
c# ×2
certificate ×2
java ×2
php ×2
ssl ×2
.net ×1
curl ×1
delphi ×1
delphi-xe3 ×1
ftp-client ×1
git ×1
https ×1
indy ×1
junit ×1
mocking ×1
validation ×1