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

SSH

Running sshd2 as a Started Task

To run sshd2 as a started task, use a JCL procedure such as SSHD2 (shown below) from /opt/tectia/doc/zOS/SAMPLIB. The JCL must be installed in the procedure library.

SSHD2:

//SSHD2   PROC OPTS='',PORT=
//TECTIA  EXEC PGM=BPXBATSL,
//             REGION=0M,
//             TIME=NOLIMIT,
//             PARM=('PGM /opt/tectia/sbin/sshd2 -F &PORT   1 
//              &OPTS')
//STDENV   DD  DSN=SSZ.SRVR648.PARMLIB(SSHENV),DISP=SHR
//STDOUT   DD  SYSOUT=*
//*STDERR   DD  SYSOUT=*
//STDIN    DD  DUMMY
//         PEND
1

Note that when sshd2 is run as a started task, the -F (foreground) option is required to prevent sshd2 from detaching itself as a daemon. If sshd2 is run as a started task without the -F option, it cannot be modified.

Start the server with the following operator command:

===> s sshd2 

The sshd2 job starts.

You can enter command options (described in detail in sshd2 Options) as an OPTS parameter on the "start". For example, configuration file options are entered in the following format (where keyword is a configuration file keyword):

===> S SSHD2,OPTS='-okeyword=value'

For example, to set SftpSmfType to TYPE119, enter:

===> S SSHD2,OPTS='-oSftpSmfType=TYPE119'

You can query the version of the server with the following command:

===> F SSHD2,VERSION

The sshd2 started task can also be started with a user-specified job name:

===> s SSHD2,jobname=own_job_name

You can assign the SSHD2 user to the started task by defining the procedure in the STARTED class and entering the user ID in the STDATA segment, for example:

RDEFINE STARTED SSHD2.* STDATA(USER(SSHD2)GROUP(SYS1))
SETROPTS RACLIST(STARTED) REFRESH 

For more information, see sshd2(8).


 

 
PrivX
 

 

 
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