Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Workaround for PDF export bug

...

How to setup ‘ssh’ trusts between Linux and Tru64

...

Please note:

  • The prompts will tell you where to execute the commands, "Tru64#" (root user) or "Linux#"  (root user)
  • Remember Linux/Unix is case sensitive
  • If hosts are not known by each other, fill the /etc/hosts file for example (using vi for example)
  • linuxhost represents the name of your CHARON server (can be any name you want)
  • tru64host represents the hostname of your Tru64 virtual machine


  • Generate the key

Linux# cd /root/.ssh
Linux# ssh-keygen -t rsa

→ Do not specify a passphrase
Linux# ssh-keygen -e -f id_rsa.pub > linuxhost.pub

...

(question) If trying to execute a remote command on the Tru64 system, a message telling "no matching cipher found" is displayed, the cipher has to be setup on the Linux server side in the /root/.ssh/config file:

# cat /root/.ssh/config

Host tru64host
  Hostname tru64host
  KexAlgorithms +diffie-hellman-group1-sha1
  HostKeyAlgorithms +ssh-dss
  Ciphers +3des-cbc


Div
classpagebreak

How to setup ‘ssh’ trusts between Linux and VMS

...

Please note:

  • The prompts will tell you where to execute the commands, "VMS$" (system user) or "Linux#"  (root user)
  • Remember Linux/Unix is case sensitive, VMS is not
  • Linux: if VMS host is not known, add it to /etc/hosts for example
  • VMS: if Linux is not known, add it using: $ UCX SET HOST LINUX /ADDR=xx.xx.xx.xx


  • Enable SSH on the VMS server:

    VMS$ SET DEF SYS$LOGIN
    VMS$ @TCPIP$CONFIG


  • Select then:
    • Option 3 - Server components then enable and start service SSH, option 19
    • then Option 2 - Enable & Start service on this node

      ...
      * Create a new default server host key? YES: YES
           Creating private key file: TCPIP$SSH_DEVICE:TCPIP$SSH.SSH2]HOSTKEY
           Creating public key file: TCPIP$SSH_DEVICE:TCPIP$SSH.SSH2]HOSTKEY.PUB
      ...


  • Generate the key on the Linux server and convert it to be readable by VMS

    Linux# ssh-keygen -t rsa

    → Do not specify a passphrase
    Linux# ssh-keygen -e -f /root/.ssh/id_rsa.pub > /root/.ssh/linuxserver.pub


...

  • On the VMS system add the Linux server key to the authorized keys:

    VMS$ SET DEF SYS$SYSLOGIN
    VMS$ SET DEF SYS$SYSROOT:[.SSH2]
    VMS$ OPEN/WRITE TMP AUTHORIZATION.

    (warning) If the file already exists, use /APPEND instead of /WRITE
    VMS$ WRITE TMP "KEY LINUXSERVER.PUB"
    VMS$ CLOSE TMP

    (warning) Do not forget the dot at the end of the authorization file name

...

  • Perform some tests (examples)
    (info) Charon server name "charon", vms system name "pluto":

    charon# ssh system@pluto "show system /noproc"
    OpenVMS V7.3-2 on node PLUTO 27-SEP-2013 11:50:14.37 Uptime 0 19:20:07


...

To setup 'rsh' on RHEL8, use the following commands:

#

yum

dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
ARCH=$( /bin/arch )
subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms"
dnf -y install rsh

(info) More information in this article: rsh and rsh-server packages missing in RHEL 8

...

# firewall-cmd --permanent --new-service=Charon
# firewall-cmd --permanent --service=Charon --add-port=113/tcp
# firewall-cmd --permanent --service=Charon --add-port=1022/tcp
# firewall-cmd --get-active-zones
public
interfaces: ens34 ens35
# firewall-cmd --zone=public --permanent --add-service=Charon
# firewall-cmd --reload


Div
classpagebreak


How to setup ‘rsh’ trusts between Linux and OpenVMS

...

To facilitate use of "expect" for shutdown, an example is provided in the "guest_shutdown.exp" script located in the /opt/charon/utils folder. If you plan to customize the script, you'll have to create a copy and not use it directly as it will be overwritten in case of Toolkit upgrade.

Please note:

'telnet' and 'expect' packages must be installed in order to use this feature.

The following error message can be returned when stopping the virtual machine when trying to use the expect script example:

  • if expect package is not installed: "Stop script returned error code 126".
  • if telnet is not installed: "%EXPECT-F-NOSRM, Cannot continue, 'telnet' is not installed" then "Stop script returned error code 4"

Caution: the virtual machine process will be however killed by service management process

...


...

If console is locked:

Any active session to the console must be killed before the "expect" script is executed.

(info) For example, if you are connected via "telnet" on the localhost/port (the kill is not done inside the expect script). Using the "/opt/charon/utils/charon_gstart_expect" script file the necessary operations will be performed.

(warning) If the console is locked from another host (if you use putty for example), you will have to cancel the connection by yourself otherwise the shutdown will not be performed cleanly.


This script can handle the following situations:

...