如何使用 FTP 从 Solaris 获取/放置 IBM 大型机?
由于某种原因,当我尝试使用 get 或 put 从 Solaris 机器到 IBM 大型机时,ftp 客户端似乎挂起。
我尝试了各种不同的变体(例如,包括使用引号和不使用引号),但我得到的只是“200 端口请求正常”。但我再也没有收到提示,最终连接中断了。
ftp> open ibm.some_server
Connected to ibm.some_server
230 USER1 is logged on. Working directory is "USER1.".
Remote system type is MVS.
ftp> cd 'Z.TABS.'
250 "Z.TABS." is the working directory name prefix.
ftp> get 'SAMASCPY' samas.txt
200 Port request OK.
有人知道会发生什么吗?
For some reason when I try to use get or put from a Solaris box to an IBM mainframe, the ftp client appears to hang.
I've tried all sorts of different variations (for example, including using quotes and not), and all I ever get is a "200 Port Request OK". But I never get the prompt back, and eventually the connection breaks.
ftp> open ibm.some_server
Connected to ibm.some_server
230 USER1 is logged on. Working directory is "USER1.".
Remote system type is MVS.
ftp> cd 'Z.TABS.'
250 "Z.TABS." is the working directory name prefix.
ftp> get 'SAMASCPY' samas.txt
200 Port request OK.
Anyone know what could be going on?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要启用被动模式。使用 Solaris 10 的 ftp:
最初定义的 FTP 协议使服务器在启动文件传输时打开返回到客户端的连接。这就是您问题中的 PORT 命令所显示的内容 - 客户端请求服务器连接回其在特定端口号上的地址。如今,防火墙和网络已无处不在。 NAT 穿越,很少起作用。
启用被动模式告诉客户端直接连接到服务器,并修复了此问题。现在大多数 ftp 客户端默认使用被动模式; Solaris 没有。
You need to enable passive mode. With Solaris 10's ftp:
The FTP protocol as originally defined makes the server open a connection back to the client when a file transfer is initiated. That's what the PORT command in your question shows -- the client requested that the server connect back to its address on a specific port number. These days, with ubiquitous firewalls & NAT traversals, that rarely works.
Enabling passive mode tells the client to connect directly to the server, and fixes this issue. Most ftp clients now use passive mode by default; Solaris' does not.