大网数据广告活动
服务器运维问答

Windows FTP over SSH

· 52CE 我爱测

We have quite a lot of scripts that are used to upload and download files with a vendor on the Internet using the Windows supplied ftp.exe . This is proxied via SideWinder and is FTP out to the vendor, however they support SFTP. …

问题原文

原帖链接 · AbraCadaver · CC BY-SA 4.0

We have quite a lot of scripts that are used to upload and download files with a vendor on the Internet using the Windows supplied ftp.exe. This is proxied via SideWinder and is FTP out to the vendor, however they support SFTP.

We make use of ftp -s:filename which Specifies a text file containing FTP commands; the commands will automatically run after FTP starts.

ftp -n -s:dir\filename.ftp proxy.example.com

What we would like to do is tunnel this over the Windows supplied ssh.exe so that we can eliminate the SideWinder proxy and continue to use the existing filename files for the FTP commands.

Is this possible using the Windows supplied ssh.exe and ftp.exe and what would be the configuration?

I do know that there are SFTP programs out there for free. We're trying accomplish this with minimal changes to the existing system. Hopefully it is as simple as an SSH connection in the script prior to the FTP connection and operations.

已采纳解答

原帖链接 · Stuggi · CC BY-SA 4.0

I know this is not the answer you want, but I strongly recommend switching to SFTP.

First of all, SFTP is a different protocol, it's not just FTP over an SSH tunnel. So proxying ftp.exe over ssh.exe won't work, unless you want to access an FTP server behind an SSH tunnel.

Personally, I'd recommend switching to WinSCP, it's free, it has a very good Powershell support, so you could easily write a PowerShell script to parse your current file and execute the required commands using WinSCP instead.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-04-03)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。