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-fileFILE option to provide the password.

Note

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:

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

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

$ chmod 600 /home/userid/passwd_file

Edit the file with your favorite text editor to contain one line with your password on the remote system, for example:

MyPasS

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:

Allocate a dataset or a dataset member, for example:

//'USERID.PASSWD'

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

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:

MyPasS

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

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

Copyright 2011 Tectia Corporation This software is protected by international copyright laws. All rights reserved.Contact Information

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