SSH Tectia 
PreviousNextUp[Contents] [Index]

    About This Document >>
    Installing SSH Tectia Server for IBM z/OS >>
    Getting Started with SSH Tectia Server for IBM z/OS >>
    Configuring the Server >>
    Configuring the Client >>
    Authentication >>
    File Transfer Using SFTP >>
    File Transfer Using Transparent FTP Tunneling >>
    Tunneling on the Command Line >>
        Local Tunnels >>
        Remote Tunnels
            Examples of Remote Tunneling
        Tunneling FTP on the Command Line >>
        Agent Forwarding
    Troubleshooting SSH Tectia Server for IBM z/OS >>
    Advanced Information >>
    Man Pages >>
    Log Messages >>

Examples of Remote Tunneling

This section shows an example (SSZJTUNN from SAMPLIB) of creating tunnels for connecting to a database server.

  1. The TUNNEL1 step opens two remote and two local tunnels.
  2. The DBPROC step runs a ficitional database replication command.
  3. The SSH2STOP step closes the tunnels and the ssh2 connection.

The remote database server must have a Secure Shell server running and non-interactive authentication must be set up and enabled.

When adapting the example to real life, note that the local port number used for the secure listener must be unique for each instance of the script which can get run concurrently.

//      JCLLIB ORDER=&SYSUID..SSZ.SRVR551.SAMPLIB
//*
//TUNNEL1 EXEC SSZP
//SYSTSIN  DD  *
 %SSZRSSH -S -f +
          -oPidfile=/tmp/my_ssh2.pid +
          -R 2345:localhost:2345 +
          -R 2346:localhost:2346 +
          -L 3456:localhost:3456 +
          -L 3457:localhost:3457 +
          username@remote_db_server
//*
//DBPROC  EXEC DBPROC,     
//        SERVER=LOCALHOST,
//        ACTION=REPL
//*
//SSH2STOP     EXEC PGM=BPXBATCH,
//             REGION=0M,
//             TIME=100,
//             PARM='SH kill `cat /tmp/my_ssh2.pid`'
//STDOUT   DD  PATH='/tmp/&SYSUID.-SSH2STOP.out',
//             PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
//             PATHMODE=(SIRUSR,SIWUSR)
//STDERR   DD  PATH='/tmp/&SYSUID.-SSH2STOP.err',
//             PATHOPTS=(OWRONLY,OCREAT,OTRUNC),
//             PATHMODE=(SIRUSR,SIWUSR)
/*

PreviousNextUp[Contents] [Index]


[ Contact Information | Support | Feedback | SSH Home Page | SSH Products ]

Copyright © 2007 SSH Communications Security Corp.
This software is protected by international copyright laws. All rights reserved.
Copyright Notice