SSH

File Transfers Using FTP-SFTP Conversion

Tectia ConnectSecure provides an FTP-SFTP conversion functionality that enables users to use their existing interactive and unattended FTP applications and tools. FTP-SFTP conversion can also be used for file transfers from Windows and Unix clients to z/OS servers.

For configuring FTP-SFTP Conversion for Windows or Unix, see the Tectia ConnectSecure Administrator Manual at http://www.ssh.com/services/online-resources. Once configured, existing FTP application can be used like before.

Example: Using FTP-SFTP conversion to transfer MVS data set using existing FTP client application. All the standard FTP commands can be used.

$ ftp zos
Connected to zos (10.10.10.10).
220----- SSH FTP-SFTP Conversion ------
220------------------------------------
220 Your FTP connection is now SECURED!
Name (zos:user1): user1
331 Send password please.
Password:
230 You are logged on.
Remote system type is MVS.

ftp> ls
227 Entering Passive Mode (127,0,0,1,78,32).
150 Connecting to data port.
Volume Referred    Recfm Lrecl BlkSz Dsorg    Space  Dsname
Z6SYS1 Jul 17 2006 VB     1024 27998 PS       50001  BINARY.FILE
Z6SYS1 Jul 17 2006 VB     1024 27998 PS       50001  FILE1.PS
Z6SYS1 Jul 17 2006 FB       80  6080 PS       50001  FILE1.VSAM
Z6SYS1 Jul 17 2006 FB       80 27920 PO       50001  PDS
Z6SYS1 Jul 25 2006 VB     1024 27998 PO       50001  SAMPLIB
Z6SYS1 Jul 25 2006 VB     1024 27998 PS       50001  TEST.PS.FILE2
Z6SYS1 Jul 25 2006 VB     1024 27998 PO       50001  TEST2.PDS
226 List completed successfully.

ftp> get FILE1.PS /tmp/file1.txt
local: /tmp/file1.txt remote: FILE1.PS
227 Entering Passive Mode (127,0,0,1,78,33).
150 Connecting to data port.
226 Transfer completed successfully.
49 bytes received in 0.421 secs (0.11 Kbytes/sec)

ftp> cd test2
250 "'USER1.TEST2.'" is the working directory name prefix.

ftp> cd PDS
250 The working directory "'USER1.TEST2.PDS'" is a partitioned data set.

ftp> ls               
227 Entering Passive Mode (127,0,0,1,78,34).
150 Connecting to data port.
MEMBER1
226 List completed successfully.

ftp> put textfile.txt member2
local: textfile.txt remote: member2
227 Entering Passive Mode (127,0,0,1,78,35).
150 Connecting to data port.
226 Transfer completed successfully.
71 bytes sent in 3.3e-05 secs (2.1e+03 Kbytes/sec)
ftp>

Example 2: Using the site command to define additional data set parameters (on Tectia Client 5.2 and later).

ftp> site
(arguments to SITE command) LRECL=200
200 SITE command was accepted

ftp> site recfm=FB,C=ISO8859-1,D=IBM-1047,X=TEXT
200 SITE command was accepted

ftp> rstatus
211-SSH FTP-SFTP conversion status:
        Version 5.2 Build 53
211-Connected to 10.1.49.158
211-Logged in as user1
211-Site parameters: O=FB,R=200,X=TEXT,C=ISO8859-1,D=IBM-1047
211 End of status.

ftp>  put textfile.txt //'USER1.SITE.TEST'
local: textfile.txt remote: //'USER1.SITE.TEST'
227 Entering Passive Mode (127,0,0,1,78,38).
150 Connecting to data port.
226 Transfer completed successfully.
71 bytes sent in 4.1e-05 secs (1.7e+03 Kbytes/sec)
ftp>