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

SSH

Remote Command Examples using JCL

Example 1: JCL with remote command for creating a directory on a remote Unix system:

//SSH EXEC PGM=BPXBATSL,REGION=0M,TIME=NOLIMIT
//STDPARM DD *
PGM /opt/tectia/bin/sshg3 user1@unix.example.com
mkdir testdir
//STDENV DD DSN=<HLQ>.V663.PARMLIB(SSHENV),DISP=SHR
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDIN DD DUMMY
//

(Use this JCL to complete the following examples.)

Example 2: Remote command for creating a directory on a remote Windows system. Use the following as input data for the STDPARM DD in Example 1:

PGM /opt/tectia/bin/sshg3 user2@windows.example.com
cmd /c mkdir testdir

Note that quotes (") are not needed when commands are run from JCL

Example 3: Multiple commands. Use the following as input data for the STDPARM DD in Example 1:

PGM /opt/tectia/bin/sshg3 user1@unix.example.com
cd /tmp;
ls -l test.*;
rm test.txt

Note that quotes (") are not needed around multiple remote commands when they are run from JCL.


 

 
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