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

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.

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

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.

The scp manpage on z/OS states:

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.

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?

解决方案

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

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

you can do a similar thing with the secure FTP:

sftp IdentityFile=ident_file -b - linux_user@linux_box <

binary

put zos_file linux_file

EOF

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值