SSH Tectia  
Previous Next Up [Contents] [Index]

    About This Document >>
    Installing SSH Tectia Server for IBM z/OS >>
    Getting Started with SSH Tectia Server for IBM z/OS >>
    Configuring the Server >>
    Configuring the Client >>
    Authentication >>
    File Transfer Using SFTP >>
        Handling MVS Datasets and HFS File System Access>>
        Controlling File Transfer>>
            Advice String
            File Transfer Profiles
            File Transfer Environment Variables for the Clients
            File Transfer Environment Variables for the Server
        Staging
        Listing Datasets with SFTP Clients>>
        Secure File Transfer Examples Using the z/OS Client>>
        Secure File Transfer Examples Using Windows and Unix Clients>>
    File Transfer Using Transparent FTP Tunneling >>
    Tunneling on the Command Line >>
    Troubleshooting SSH Tectia Server for IBM z/OS >>
    Advanced Information >>
    Man Pages >>
    Log Messages >>

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.

File transfer server uses the following environment variables:

 
SSH_SFTP_HOME_MVS                       (default: "no")
SSH_SFTP_RECORD_TRUNCATE                (default: "no")
SSH_SFTP_STAGEFS_CACHE_SIZE_LIMIT       (default: "524288000")
SSH_SFTP_STAGEFS_CACHE_ENTRY_LIFETIME   (default: "10")
SSH_SFTP_STAGEFS_CACHE_REFRESH_INTERVAL (default: "5")
SSH_SFTP_DEBUG                          (default: NULL)
SSH_SFTP_DEBUG_FILE                     (default: NULL)

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:

sftp> open user1@zos
sftp> sput remote_file ~/mf.file

Or:

sftp> open user1@zos
sftp> sput remote_file /u/user1/mf.file

The same applies to the Windows SCP client command.

Previous Next Up [Contents] [Index]


[ Contact Information | Support | Feedback | SSH Home Page | SSH Products ]

Copyright © 2007 SSH Communications Security Corp.
This software is protected by international copyright laws. All rights reserved.
Copyright Notice