Your browser does not allow storing cookies. We recommend enabling them.

SSH Tectia

Password in File or Dataset

Password authentication requires normally user interaction. For situations where user interaction is not possible, for example when running SSH Tectia client programs from JCL, you can set up the password in file or dataset.

With sshg3, scpg3, and sftpg3, use the --password=file://FILE option to provide the password. With ssh-keydist-g3, use the --password-file FILE option to provide the password.


When storing a password in a file or dataset, make sure that the access permissions are correct.

For non-interactive batch jobs, we recommend that you use public-key authentication without a passphrase, or host-based authentication. These methods provide more security than a password stored in a file.

Password in File

To set up password-in-file authentication:

  1. Create a file, for example /home/userid/passwd_file.

  2. Make sure the file is readable only by the user that created it:

    $ chmod 600 /home/userid/passwd_file
  3. Edit the file with your favorite text editor to contain one line with your password on the remote system, for example:


To use the password in file, for example with sftpg3, run the following:

$ sftpg3 --password=file:///home/userid/passwd_file

Password in Dataset

To set up password-in-dataset authentication:

  1. Allocate a dataset or a dataset member, for example:

  2. Make sure that the dataset is accessible only by the correct UserID.

  3. Edit the password dataset to contain your password on the remote system. The format of the password dataset is one line containing only the password. For example:


To use the password in dataset, for example with sftpg3, run the following:

$ sftpg3 --password=file:////'USERID.PASSWD'




What to read next:

  • Reduce Secure Shell risk. Get to know the NIST 7966.

    The NISTIR 7966 guideline from the Computer Security Division of NIST is a direct call to action for organizations regardless of industry and is a mandate for the US Federal government.
    Download now
  • ISACA Practitioner Guide for SSH

    With contributions from practitioners, specialists and SSH.COM experts, the ISACA “SSH: Practitioner Considerations” guide is vital best practice from the compliance and audit community.
    Download now