SFTP from zOS mainframe to Unix Server Examples

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
sz1cml
Posts: 2
Joined: Thu Jul 02, 2015 1:25 pm
Location: Los Angeles area

SFTP from zOS mainframe to Unix Server Examples

Post by sz1cml »

I have been using SFTP COZBATCH on our zOS mainframe for a couple of years now. These file transfers have been mainframe to mainframe. We are now being asked to use matched key pairs to PUT files from our zOS mainframe to a UNIX server. Does anyone have an example of a set of SFTP control statements to accomplish this?
I have been able to generate the RSA keys, store the private key in my /.ssh directory, send the public key to the remote server, but am struggling with the modifications necessary of the existing set of control statements to make it work with 1) remote UNIX server, and 2) the use of RSA key pairs.
Many thanks in advance for any assistance.
Bill
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: SFTP from zOS mainframe to Unix Server Examples

Post by dovetail »

If you want to use a private key stored in the Unix file system, then OpenSSH will by default automatically look in ~/.ssh/id_rsa and id_dsa.
If you want other files, you can use the -oIdentityFile= option. See the IBM Ported Tools OpenSSH User's guide for more details on the IdentityFile ssh option.

That said, we don't think that putting private keys in the Unix file system is best practice on z/OS. It is much better to use z/OS Digital Certificates in SAF/RACF/ACF2/TSS Key Rings to hold your private keys.

See these references:

http://dovetail.com/webinars.html
IBM Ported Tools for z/OS: OpenSSH - Key Authentication
IBM Ported Tools for z/OS: OpenSSH - Using Key Rings

and:
http://dovetail.com/docs/sftp/auth.html
Post Reply