diff --git a/content/blog/ilo2-vps-ssh-ubuntu.md b/content/blog/ilo2-vps-ssh-ubuntu.md new file mode 100644 index 0000000..0ada16d --- /dev/null +++ b/content/blog/ilo2-vps-ssh-ubuntu.md @@ -0,0 +1,89 @@ +--- +title: "HP iLO2 VSC via SSH on Ubuntu" +tags: ["hp", "ilo", "ssh", "vsp", "tty", "grub"] +categories: [recipe, sysadmin] +description: "How to user HP iLO2 Virtual Serial Console via SSH on Ubuntu" +date: 2020-06-25T11:46:08+02:00 +author: "Ettore Dreucci" +draft: true +--- + +## [[recipe]({{< ref "/categories/recipe" >}}), [sysadmin]({{< ref "/categories/sysadmin" >}})]: How to user HP iLO2 Virtual Serial Console via SSH on Ubuntu + +I’ve an old HP ProLiant DL360 G5 rack server with Ubuntu 16.04 at a remote location. Sometimes I’ve the need to remotely connect to it and look at the boot sequence. + +iLO2 web interface has a Java applet to use the remote console but unfortunately with last versions of Firefox and Chrome it doesn’t work anymore. + +So here we are: + +### Configure GRUB to use VSP + +To use and control GRUB via a virtual serial port we have to configure it: + +1. In `/etc/default/grub` we need to change this lines: + + ``` + GRUB_HIDDEN_TIMEOUT=15 + GRUB_HIDDEN_TIMEOUT_QUIET=false + GRUB_TIMEOUT=15 + GRUB_CMDLINE_LINUX="text console=tty0 console=ttyS1,115200n8" + GRUB_TERMINAL=console + ``` + + That way the kernel messages are being redirected to tty0 and ttyS1 + +2. Create `/etc/init/ttyS1.conf` to start a getty on the vsp with: + + ``` + # ttyS1 - getty + # + # This service maintains a getty on tty1 from the point the system is + # started until it is shut down again. + + start on stopped rc RUNLEVEL=[2345] and ( + not-container or + container CONTAINER=lxc or + container CONTAINER=lxc-libvirt) + + stop on runlevel [!2345] + + respawn + exec /sbin/getty -8 115200 ttyS1 + ``` + +### Connect to iLO2 via SSH + +iLO2 support old key algorithms and chipers so we need to specify those: + +``` +ssh -o HostKeyAlgorithms=ssh-rsa,ssh-dss -o KexAlgorithms=diffie-hellman-group1-sha1 -o Ciphers=aes128-cbc,3des-cbc -o MACs=hmac-md5,hmac-sha1 ILO2_IP_ADDR +``` + +### Start the VSP + +``` +hpiLO-> VSP + +Starting virtual serial port. +Press 'ESC (' to return to the CLI Session. + +hpiLO-> Virtual Serial Port active: IO=0x03F8 INT=4 +Ubuntu 16.04 ttyS0 + +login: + +Job done ?? + +Other CLI commands available: + +HP CLI Commands: + +POWER : Control server power. +UID : Control Unit-ID light. +NMI : Generate an NMI. +VM : Virtual media commands. +VSP : Invoke virtual serial port. +VSP LOG : Invoke virtual serial port data logging. +TEXTCONS : Invoke Remote Text Console on supported platforms. +``` +