简体   繁体   English

如何说服z / OS scp传输二进制文件?

[英]How can I convince z/OS scp to transfer binary files?

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. 目前,我们已经为Linux到Linux设置了基于SSH的文件传输脚本,并且我们正在将它们移植到z / OS以便从z / OS到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. 请注意,这是与USS一起使用的,它是z / OS中的UNIX系统服务,也称为OMVS,在幕后使用EBCDIC, 而不是在 zASCII上使用ASCII的zLinux。

We've set up all the SSH key files and what-not, and the transfer itself is working fine. 我们已经设置了所有SSH密钥文件和其他内容,并且传输本身运行良好。

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是二进制文件,但z / OS具有无限智慧,仍然坚持将文件从EBCDIC转换为ASCII-这正在破坏目标文件的内容。

The scp manpage on z/OS states: z / OS上的scp页指出:

scp assumes that files are text. scp假定文件是文本。 Files copied between EBCDIC and ASCII platforms are converted. 在EBCDIC和ASCII平台之间复制的文件将被转换。

and I can find nothing useful in the manuals that indicates how to get around this. 我在手册中找不到任何有用的方法来指示如何解决此问题。

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标准密钥文件(为了安全起见需要此文件,不允许使用裸FTP)进行二进制传输而不进行转换的方法吗?

You can use one of the other SSH-based tools such as sftp . 您可以使用其他基于SSH的工具之一,例如sftp

Whereas scp will let you transfer a file (with automatic authentication set up) with something like: scp将使您可以通过以下方式传输文件(具有自动身份验证设置):

scp -i ident_file zos_file linux_user@linux_box:linux_file

you can do a similar thing with the secure FTP: 您可以使用安全FTP做类似的事情:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM