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

We have SSH-based file transfer scripts that are currently configured for Linux-to-Linux, and we are moving them to z / OS to migrate to z / OS-to-Linux. Note that this is with USS, UNIX system services on z / OS, otherwise known as OMVS, which uses EBCDIC covers, not zLinux, which uses ASCII.

We installed all the SSH key files, and what not, and the transfer itself works fine.

However, z / OS, which has infinite wisdom, insists on converting files from EBCDIC to ASCII, despite the fact that they are binary files - this wraps the contents of the target files.

The man file scpfor z / OS says:

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

and I cannot find anything useful in manuals that show how to get around this.

It seems like a strange limitation for those who want to transfer binary files between two platforms. Does anyone know a way using SSH-standard key files (we need this for security, without bare FTP is allowed) to perform binary transfer without translation?

+4
source share
1 answer

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

scp ( ) - :

scp -i ident_file zos_file linux_user@linux_box:linux_file

FTP:

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

Source: https://habr.com/ru/post/1544295/


All Articles