You have Javascript disabled. While you will be able to browse this site without Javascript, some functionality on this site will not work without it. We strongly recommend enabling Javascript in your browser. This site uses cookies and collects data about visitor behavior for improving user experience, identifying returning visitors, and providing personalized offers. Your continued use of this site indicates your consent to this. See Privacy Policy for details or if you wish to disable cookies.

Your browser does not allow this site to store cookies and other data. Some functionality on this site may not work without them. See Privacy Policy for details on how we would use cookies.

This site uses cookies and collects data about visitor interaction for improving user experience, identifying returning visitors, and providing personalized offers. Your continued use of this site indicates your consent to this. See Privacy Policy for details or if you wish to disable cookies.

File Transfer Environment Variables for the Server

The environment variables for SSH Tectia Server for IBM z/OS file transfer can be set in the /etc/environment file globally for all users and in the $HOME/.ssh2/environment file for each user separately.

If SSH_SFTP_HOME_MVS is set to yes, the file transfer server starts in the MVS side. The file transfer client sees USER prefix as its starting directory. Default is no, the file transfer server starts in the USS side. See File Transfer Home below for examples of using this variable.

The SSH_SFTP_RECORD_TRUNCATE environment variable can be used to set the default value for the RECORD_TRUNCATE file transfer attribute. The valid values are yes and no. The environment variable will be overridden by a matched transfer profile or the advice string if they contain the RECORD_TRUNCATE (or U) attribute. If none of these sources is available, no will be used.

The SSH_SFTP_STAGEFS_CACHE_SIZE_LIMIT variable specifies staging cache size in bytes. It limits the use of system resources. The default is 524288000 bytes (500 MB).

The SSH_SFTP_STAGEFS_CACHE_ENTRY_LIFETIME variable specifies how many seconds one cache entry is stored in the cache. After the lifetime has expired the entry is removed from the cache and system resources are released. The default is 10 seconds.

The SSH_SFTP_STAGEFS_CACHE_REFRESH_INTERVAL variable specifies how many seconds may pass until the cache is refreshed. The default is 5 seconds.

With SSH_SFTP_DEBUG, the debug level can be set for the file transfer server.

If SSH_SFTP_DEBUG_FILE is set, debug messages are stored in the file named in the variable.

Setting the File Transfer Home Location

For SFTP connections, the file transfer home location is the directory on the server where the SFTP session starts. For SCP operations, the home location is the default target of the operation on the server, and directory paths are relative to the home location.

By default, SSH Tectia Server for IBM z/OS uses the user's Unix System Services (USS) home directory as the file transfer home location.

The environment variable SSH_SFTP_HOME_MVS in the user's $HOME/.ssh2/environment file on the server can be used to control the file transfer home location.

If the environment variable is omitted or its value is NO, the user's USS home directory is used as the file transfer home, for example /u/userid/, and the MVS user prefix must be accessed using "//" or "/_".

If the value of the is environment variable YES, the user's MVS USERID prefix is used as the file transfer home location, for example //'USERID., and the USS home directory must be accessed using /u/userid/ or ~.

Examples when SSH_SFTP_HOME_MVS=NO

When SSH_SFTP_HOME_MVS is set to NO (or omitted), the following put command run in the Windows SFTP client results to a file /home/user1/dataset.txt in SSH Tectia Server for IBM z/OS:

sftp> open user1@zos
sftp> put dataset.txt

Also the following Windows SCP client command would result to the same file:

$ scpg3 file.txt user1@zos:/ftadv:X=TEXT/dataset.txt

The following sput command run in the Windows SFTP client results to a MVS sequential dataset //'USERID.MF.FILE in SSH Tectia Server for IBM z/OS:

sftp> open user1@zos
sftp> sput remote_file /_mf.file

The same applies to the Windows SCP client command.

Examples when SSH_SFTP_HOME_MVS=YES

When SSH_SFTP_HOME_MVS is set to YES, the following put command in a Windows SFTP client results to a dataset //'USER1.DATASET.TXT' in SSH Tectia Server for IBM z/OS:

sftp> open user1@zos
sftp> put dataset.txt

Also the following Windows SCP client command would result to the same dataset:

$ scpg3 file.txt user1@zos:/ftadv:X=TEXT/dataset.txt

The following sput command run in the Windows SFTP client results to a USS file /u/user1/mf.file in SSH Tectia Server for IBM z/OS: