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


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'


Highlights from the SSH.COM blog:

  • Cryptomining with the SSH protocol: what big enterprises need to know about it

    Cryptomining malware is primarily thought of as targeting desktops and laptops and is used to hijack system resources to mine cryptocurrency.
    Read more
  • SLAM the door shut on traditional privileged access management

    Did you know that something as trivial-sounding as granting access for your developers or third parties to a product development environment can throw a gorilla-sized monkey wrench into your operations and productivity?
    Read more
  • We broke the IT security perimeter

    Everyone understands the concept of a security perimeter. You only gain access if you are identified and authorized to do so.
    Read more