如何说服z/OS scp传输二进制文件? [英] How can I convince z/OS scp to transfer binary files?

查看:240
本文介绍了如何说服z/OS scp传输二进制文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前为Linux到Linux设置了基于SSH的文件传输脚本,并将它们移植到z/OS以便从z/OS到Linux.请注意,这是与USS一起使用的,它是z/OS中的UNIX系统服务,也称为OMVS,它在幕后使用EBCDIC,不是使用ASCII的zLinux.

We have SSH-based file transfer scripts currently set up for Linux-to-Linux and we're porting them to z/OS to go z/OS-to-Linux. Note that this is with USS, the UNIX system services within z/OS otherwise known as OMVS, which uses EBCDIC under the covers, not zLinux which uses ASCII.

我们已经设置了所有SSH密钥文件和其他内容,并且传输本身工作正常.

We've set up all the SSH key files and what-not, and the transfer itself is working fine.

z/OS具有无限智慧,尽管它们是二进制文件,但仍坚持将文件从EBCDIC转换为ASCII-这弄乱了目标文件的内容.

However z/OS, in it's infinite wisdom, insists on converting the files from EBCDIC to ASCII despite the fact that they're binary files - this is screwing up the content of the destination files.

z/OS上的scp手册页指出:

The scp manpage on z/OS states:

scp 假定文件是文本.在EBCDIC和ASCII平台之间复制的文件 被转换.

scp assumes that files are text. Files copied between EBCDIC and ASCII platforms are converted.

在说明如何解决此问题的手册中,我找不到任何有用的东西.

and I can find nothing useful in the manuals that indicates how to get around this.

对于任何想要在两个平台之间传输二进制文件的人来说,这似乎是一个奇怪的限制.有谁知道一种使用SSH标准密钥文件(出于安全性而需要此文件,不允许裸FTP)使用此文件来实现二进制传输而无需转换的方法吗?

It seems a bizarre limitation for anyone wanting to transfer binary files between the two platforms. Does anyone know of a way, using SSH-standard keyfiles (we need this for security, no naked FTP allowed), to effect a binary transfer without translation?

推荐答案

您可以使用其他基于SSH的工具之一,例如sftp.

You can use one of the other SSH-based tools such as sftp.

scp允许您通过以下方式传输文件(已设置自动身份验证):

Whereas scp will let you transfer a file (with automatic authentication set up) with something like:

scp -i ident_file zos_file linux_user@linux_box:linux_file

您可以使用安全的FTP做类似的事情:

you can do a similar thing with the secure FTP:

sftp IdentityFile=ident_file -b - linux_user@linux_box <<EOF
    binary
    put zos_file linux_file
EOF

这篇关于如何说服z/OS scp传输二进制文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆