Often when supporting AIX systems, it is quite common to use a remote console. Using a Hardware Management Console (HMC) it’s quite common to use the command “vtmenu”, then open a remote console session to a specific Logical Partition (LPAR). This is useful for a number of things. One such usage is when you create a new LPAR, you may wish to install an OS using AIX media or perhaps an ISO which may contain a mksysb backup converted into ISO format.
However, sometimes you’ll use screen in combination with ssh, so you can have multiple terminal sessions opened at once. The command to typically close out a hmc remote console, is the key-combination ~. If you are in a ssh screen session, and you use that key-combination it will close out your ssh session. You have to stack them to get away from that.
Here is a common scenario:
ssh to work machine
open screen
in a screen terminal window, you ssh to a HMC and from the HMC you open a remote console.
Once you are done with the remote console, the terminal is sitting there. Instead of using ~. key-combination, you stack it. So you end it with ~~. key-combination. Then indicating you want to “terminate session (y/n)”. This will bring you back a screen to the HMC menus. You can work you way back, and close out all pertinent windows.