Top
Systemwalker Operation Manager V17.0.1 Installation Guide

2.11.1 Configuring SSH Communication

The mjrmtjob command uses SSH communication. Perform the following before using the mjrmtjob command as a job:

  1. Prepare an account for performing remote connection (login).

    Tasks on the Systemwalker Operation Manager server (SSH client) that will execute the mjrmtjob command

    Prepare an account for the user who will execute the mjrmtjob command. (This user is hereinafter referred to as USERA.)

    Tasks on the remote machine (SSH server)

    Prepare an account for <user name> to be specified in the mjrmtjob command. (This user is hereinafter referred to as USERB.)

  2. Configure firewall settings.

    Tasks on the remote machine (SSH server)

    Set the port that will use SSH through the firewall.

    Port used for SSH:

    Default (not specified by the mjrmtjob command -P option): 22/TCP

    Specified by the mjrmtjob command -P option: Specified Port

  3. Start the SSH service.

    Tasks on the remote machine (SSH server)

    Start the SSH service. If SSH has not been installed, install it. Refer to "Related Software" in the Systemwalker Operation Manager Technical Guide for information on the required SSH version.

    Refer to the relevant SSH manuals for information on how to install and start the service.

  4. Configure login without a password.

    You must configure these settings both on the Systemwalker Operation Manager server (SSH client) that will execute the mjrmtjob command and on the remote machine (SSH server).

    If there are multiple accounts, configure them all in the same way.

    The following steps use /home/USERA and /home/USERB as the home directories of the accounts that you prepared in step 1.

    1) Configure the Systemwalker Operation Manager server (SSH client) that will execute the mjrmtjob command.
    1. Execute the following to generate a public key:

      $ ssh-keygen -t rsa
      Generating public/private rsa key pair.
      Enter file in which to save the key (/home/USERA/.ssh/id_rsa): 
      Enter passphrase (empty for no passphrase): 
      Enter same passphrase again: 
      Your identification has been saved in /home/USERA/.ssh/id_rsa.
      :
      :

      The following two files will be created in /home/USERA/.ssh/:

      - id_rsa (private key)
      - id_rsa.pub (public key)

    2. Set permissions for the /home/USERA/.ssh/ directory and the id_rsa file (private key) located in it.

      $ chmod 700 /home/USERA/.ssh
      $ chmod 600 /home/USERA/.ssh/id_rsa
    3. Copy the id_rsa.pub file (public key) that was generated in step a to the remote machine (SSH server). The example below copies the file to /tmp on the remote machine. You can delete the id_rsa.pub file (public key) after you have deleted it.

      $ scp /home/USERA/.ssh/id_rsa.pub USERB@<remote machine>:/tmp
    Sytemwalker Operetion Manager server is Windows
    1. Create public key.

      The user (who execute mjrmtjob command) who create public key is as "USERA", execute as below if it is created under the d:\temp.

      $ mjkeygen create -k d:\temp

      The following file is created under the d:\temp.

      USERA.mjeskey.pub(Public Key)

      Note

      The user who create public key (who execute mjrmtjob command)

      In the job execution control, if the Execute jobs under the respective job owner's authority has not been specified, the user who execute mjrmtjob command is startup account of the "Systemwalker MpMjesuser" service.

      If you need to change startup account, refer to the "D.1.1 Changing the Startup Account".

    2. Transfer the USERA.mjeskey.pub (public key) created in a. to a remote machine (SSH server side), by ftp and so on.

      You can delete USERA.mjeskey.pub (the public key) after the transfer.

      In the following description, you transferred to/tmp on the remote machine.

    2) Configure the remote machine (SSH server).

    In Windows, perform the tasks below on the Cygwin Terminal started (installed) in step 3. The actual home directory exists under the cygwin installation folder.

    1. If the .ssh directory does not exist in the /home/USERB home directory of the account, create it and set permissions.

      $ mkdir /home/USERB/.ssh
      $ chmod 700 /home/USERB/.ssh
    2. Add id_rsa.pub (public key) that you copied in step c of "1) Configuring the Systemwalker Operation Manager server (SSH client) that will execute the mjrmtjob command" to the /home/USERB/.ssh/authorized_keys file. Set permissions when you first create the authorized_keys file. Then delete the /tmp/id_rsa.pub file.

      $ cat /tmp/id_rsa.pub >> /home/USERB/.ssh/authorized_keys
      $ chmod 600 /home/USERB/.ssh/authorized_keys
      $ rm /tmp/id_rsa.pub
    3) Check the connection from the Systemwalker Operation Manager server (SSH client) that will execute the mjrmtjob command to the remote machine (SSH server).
    Systemwalker Operation Manager server is Solaris/Linux

    Check if you can connect (log in) from the Systemwalker Operation Manager server (SSH client) that will execute the mjrmtjob command to the remote machine (SSH server) without entering a password.

    On the Systemwalker Operation Manager server (SSH client) that will execute the mjrmtjob command, execute the following as the user who will execute the mjrmtjob command:

    $ ssh USERB@<remote machine>

    Configuration is complete if you are not prompted for your password after you execute the above command.

    If you are prompted for your password, there is an invalid setting. Review the settings.

    Systemwalker Operation Manager server is Windows

    Confirm that the mjrmtjob command can be executed. Note that if step 5 is required, confirm it after configuring the settings in step 5.

  5. Set the environment variables.

    On the remote machine, set the environment variables that are required for executing commands or shell scripts. Refer to the relevant SSH manuals for details.

    If the operating system of the server that executes the mjrmtjob command is Windows and the operating system of the remote machine is Solaris 11.3 or later

    For the above combination, JRE8 or later is required for the Systemwalker Operation Manager server (Windows) that executes the mjrmtjob command. Install JRE8 or later and set the installation path to the environment variable "MJRMTJOB_JAVA_HOME".

    Configure the following settings for the Systemwalker Operation Manager server (Windows) that executes the mjrmtjob command in System Properties >> Environment Variables >> System variables.

    Variable: MJRMTJOB_JAVA_HOME

    Value: Installation path for JRE