IBM Support

AIX UNIX Linux HMC - Easy access to remote systems

How To


Summary

In my daily work I tend to have a shell open in an xterm from my "home" server, and if I need to, I then connect up to other servers.

Here is a way to make this simple.

Objective

Banner_AIX_i_Linux

Environment

One of my specialities is the HMC and so I very often want to open a shell on one of the ATS HMCs. (We have several, for production, test etc especially testing unreleased versions). I have a useful set of scripts to allow me to do this, well in fact it is just one script, which is in /usr/local/bin which is on my path.

-rwxr-xr-x    8 root     system           42 07 Aug 2013  hmc10
-rwxr-xr-x    8 root     system           42 07 Aug 2013  hmc11
-rwxr-xr-x    8 root     system           42 07 Aug 2013  hmc12
-rwxr-xr-x    8 root     system           42 07 Aug 2013  hmc13
-rwxr-xr-x    8 root     system           42 07 Aug 2013  hmc14
-rwxr-xr-x    8 root     system           42 07 Aug 2013  hmc15
-rwxr-xr-x    8 root     system           42 07 Aug 2013  hmc16
-rwxr-xr-x    8 root     system           42 07 Aug 2013  minthmc1
Notice that the inode has 8 links. These are all hard links of the same file. If we get another HMC, I can just run this:
ln /usr/local/bin/hmc10 /usr/local/bin/{NEWHMC}
Let's see what is in the file:
cat hmc13
HMC=$(basename $0)
ssh hscroot@${HMC} $@
So the file runs ssh to the system specified in the filename and sends any parameters as the command to run

Steps

so if I run hmc13, this happens:
/home/gaz $ hmc13
Last login: Mon Jun 12 11:35:38 2017 from blue.aixncc.uk.ibm.com
hscroot@hmc13:~>
or I can run it with a command:
vm220:/# hmc16 lshmc -V
"version= Version: 9
 Release: 1
 Service Pack: 940
HMC Build level 1911021524
MH01760 - HMC V9R1 M920 [ppc64le]
MH01788 - Required fix for HMC V9R1 M920 [ppc64le]
MH01790 - HMC V9R1 Service Pack 1 Release (M921) [ppc64le]
MH01801 - iFix for HMC V9R1 M921
MH01811 - HMC V9R1 M930
MH01821 - iFix for HMC V9R1 M910+
MH01826 - iFix for HMC V9R1 M930
MH01832 - HMC V9R1 M931
MH01837 - HMC V9R1 M940
","base_version=V9R1
"

Of course, this does require that the name lookup works, and I wasn't challenged for a password as I have exchanged ssh keys.

I have similar scripts to allow me to ssh to AIX and Linux servers as a user and/or as root.

Additional Information

You can contact me: 

Document Location

Worldwide

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"HW1A1","label":"IBM Power Systems"},"Component":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF009","label":"Firmware"},{"code":"PF041","label":"HMC"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
03 May 2021

UID

ibm11115853