Dovetailed Technologies Solutions Support Contact Us

2. Co:Z Launcher Installation

[Important]Important

Before proceeding, ensure that the Co:Z Toolkit for z/OS has been successfully installed according to the instructions provided in the document "Co:Z Toolkit Installation and Release Notes" at http://www.dovetail.com/docs/cozinstall/index.html. Be sure to make note of the installation directory.

In order to use the Co:Z Launcher (and remote Dataset Pipes clients), the Co:Z Target System Toolkit must be installed on the remote systems that you have identified. You do not need to install Co:Z on a remote system in order to use Dataset Pipes locally.

2.1 Configuring the dspipes subsystem (Optional)

To run Dataset Pipes commands initiated by a remote client, a subsystem must be configured in your z/OS OpenSSH server.[1] This subsystem does not need to be defined if you only want to use the Co:Z Launcher component of the toolkit.

This is done by updating the sshd_config file, typically located at /etc/ssh/sshd_config.[2]

Find the line "Subsystem" which defines the sftp subsystem. Immediately following the sftp line add this:

Subsystem dspipes /usr/lpp/coz/bin/dspipes

(where /usr/lpp/coz is the directory where Co:Z Toolkit is installed).

2.2 Windows Target System Installation

The distribution .zip file for Co:Z includes pre-built binaries for 32-bit Windows systems. The Windows machine must also have OpenSSH installed, which is available as part of the free Cygwin environment.

Note: Exercise caution when editing text files in the Cygwin distribution, especially shell scripts. Make sure that you use an editor that recognizes and preserves the unix line end characters. Wordpad will work in a pinch, but Notepad will not. If you are comfortable with Unix editors, you can include the vim (vi) package when you install Cygwin.

Install Cygwin and OpenSSH on Windows

Install Cygwin and OpenSSH on Windows

These instructions supplement the information available on the Cygwin website, and must be run under a Windows user with administrator privileges.

[Note]Windows Server Installation

The instructions that follow are for standard (non-server) Windows installations outside a Windows domain. For more information about installing Cygwin in a Windows Server Domain environment see this guide:

http://www.ibm.com/developerworks/wikis/display/tivoliaddm/Setting+up+a+Cygwin+OpenSSH+Server+ for+Windows+Domains+on+a+TADDM+Gateway+Server

  1. Download and excute the Cygwin setup.exe installation wizard

  2. Accept the default wizard selections, except where changes are necessary (e.g. "Select Your Internet Connection")

  3. After choosing a Download Site, the available packages are listed. Expand the Net node in the package list and click on the Skip: icon next to the package openssh. This will cause the openssh and openssl packages to be selected for installation.

  4. (Optional) Expand the "Editors" node in the package list and select the vim package if you would like to edit with vi.

  5. Wait for the installation to complete. This may take some time depending on the speed of your internet connection.

  6. Open a shell: Start+Programs+Cygwin+Cygwin Bash Shell. NOTE: This shell must be run as Administrator.

Configure and test sshd

  1. Once Cygwin is installed, setting up sshd is simply the matter of running the script ssh-host-config from the shell opened in the previous step. Recommended user responses are included below:

    win$ ssh-host-config
    Generating /etc/ssh_host_key
    Generating /etc/ssh_host_rsa_key
    Generating /etc/ssh_host_dsa_key
    Generating /etc/ssh_config file
    Privilege separation is set to yes by default since OpenSSH 3.3.
    However, this requires a non-privileged account called 'sshd'.
    For more info on privilege separation read 
    /usr/share/doc/openssh/README.privsep.
    
    Should privilege separation be used? (yes/no) yes
    Warning: The following function requires administrator privileges!
    Should this script create a local user 'sshd' on this machine? (yes/no) yes
    Generating /etc/sshd_config file
    
    
    Warning: The following functions require administrator privileges!
    
    Do you want to install sshd as service?
    (Say "no" if it's already installed as service) (yes/no) yes
    
    Which value should the environment variable CYGWIN have when
    sshd starts? It's recommended to set at least "ntsec" to be
    able to change user context without password.
    Default is "ntsec".  CYGWIN=(Enter)
    
    The service has been installed under LocalSystem account.
    To start the service, call `net start sshd' or `cygrunsrv -S sshd'.
    
    Host configuration finished. Have fun!
              

    More information on setting up OpenSSH under Cygwin are available in the /usr/share/doc/openssh/README file under the Cygwin home directory.

    Note: If you wish to have sshd listen on a port other than the default (22) edit the file /etc/sshd_config and change the Port 22 line to reflect the desired port. With Vista, you will need to change the file permissions to do this as the file is owned by a different user id. Be sure to revert the permissions after editing.

  2. Start sshd by running cygrunsrv:

    win$ cygrunsrv -S sshd
    win$ ps -eaf
          UID     PID    PPID TTY     STIME COMMAND
      sgoetze    2644       1 con  16:28:32 /usr/bin/bash
       SYSTEM    4012       1   ?  16:30:53 /usr/bin/cygrunsrv
       SYSTEM     868    4012   ?  16:30:53 /usr/sbin/sshd
      sgoetze    1664    2644 con  16:30:58 /usr/bin/ps
              
  3. Test Cygwin ssh locally:

    [Note]Note

    When you supply the Windows userid, it must match the case of the actual id on your Windows system.

    win$ ssh <userid>@localhost
    The authenticity of host 'localhost (127.0.0.1)' can't be established.
    RSA key fingerprint is cc:7c:3d:b5:3e:43:5a:6f:12:e2:1a:af:80:45:ae:fa.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
    <userid>@localhost's password:
    
    win$ logout
    Connection to localhost closed.
              
  4. Test Cygwin ssh from z/OS:

    Repeat the above test from your z/OS userid to confirm that there are no firewall issues.

    ZOS$ ssh -p <port> <userid>@windows_host

Install Co:Z target executables

  1. Download Co:Z for Windows from the downloads page.

  2. From a Cygwin bash shell, create the directory /opt if it doesn't exist.

  3. Extract the contents of the distribution .zip file to the /opt directory.

  4. Ensure that the files in /opt/dovetail/coz/bin are marked executable:

    $ cd /opt/dovetail/coz/bin
    $ chmod +x cozagent cozclient fromdsn todsn
              
  5. Add {CYGWIN_HOME}/opt/dovetail/coz/bin to your Windows PATH environment variable and ensure that {CYGWIN_HOME}/bin is also present.

2.3 Unix/Linux/Posix Target System Installation

[Note]Note

These steps are required only if you wish to use *nix as a Target system for the Co:Z Launcher or the Dataset Pipes commands remotely. You do not need to install Co:Z on a remote system in order to use Co:Z SFTP.

Configure and test sshd

Most Linux and Unix distributions include OpenSSH. Follow the instructions for your operating system for installing and configuring the OpenSSH server (sshd) on your system.

  1. Test logging into ssh locally

    linux$ ssh <userid>@localhost
    The authenticity of host 'localhost (127.0.0.1)' can't be established.
    RSA key fingerprint is cc:7c:3d:b5:3e:43:5a:6f:12:e2:1a:af:80:45:ae:fa.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
    <userid>@localhost's password: ******
    
    linux$ logout
    Connection to localhost closed.
              
  2. Test Linux ssh from z/OS:

    Repeat the above test from your z/OS userid to confirm that there are no firewall issues.

    ZOS$ ssh -p <port> <userid>@linux_host

Install Co:Z target executables

Co:Z is distributed as a binary LSB compliant RPM for many linux distributions, including Linux for System Z. If you have an LSB 3.0 compliant distribution, installation is very simple and does not require re-compilation.

If a pre-built binary package is not available for your operating system, build and install the required Co:Z binaries on your target server as described in Appendix E, Compiling the Co:Z target system sources.

To install an RPM on an RPM based disto, download the appropriate Co:Z LSB from the downloads page and issue the following command:

$ sudo rpm -i coz-toolkit-n.n-m.rpm
      

It is possible to install an LSB RPM on a Debian based distro that is LSB 3.0+ compliant (e.g. Ubuntu Dapper) as well, but it first needs to be converted to a .deb file via alien:

$ sudo alien coz-toolkit-n.n-m.rpm
$ sudo dpkg -i coz-toolkit-n.n-n.deb
      

Note: the installation directory must be in the default PATH used when logging into sshd.

On some some distros, you may need to update /etc/profile to add binaries to PATH (See this FAQ entry).



[1] SSH user subsystems are, like all SSH remote commands, executed in a process under the authenticated client userid, so normal z/OS user security determines what resources can be accessed.

[2] It is sometimes convenient to set up a test OpenSSH server where this subsystem can be easily added. Instructions for doing this can be found in the Co:Z Installation and Release Notes.

Copyright 2009 Dovetailed Technologies, LLC. All rights reserved.