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
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
ln /usr/local/bin/hmc10 /usr/local/bin/{NEWHMC}
cat hmc13
HMC=$(basename $0)
ssh hscroot@${HMC} $@
Steps
/home/gaz $ hmc13
Last login: Mon Jun 12 11:35:38 2017 from blue.aixncc.uk.ibm.com
hscroot@hmc13:~>
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:
- mailto:gaz@uk.ibm.com
- Twitter @power_gaz
- LinkedIn https://www.linkedin.com/in/gareth-coates-3b58a1144
Document Location
Worldwide
Was this topic helpful?
Document Information
Modified date:
03 May 2021
UID
ibm11115853