Quantcast
Channel: VMware ESXi – The Wiert Corner – irregular stream of stuff
Viewing all articles
Browse latest Browse all 250

ssh from Mac OS X to ESXi: “WARNING: terminal is not fully functional”

$
0
0

When connecting from my Mac to my ESXi rig, some commands (especially less) show this output:

WARNING: terminal is not fully functional

So I created this alias to connect from my Mac to the internal address of my ESXi rig:

alias ssh-esxi-X10SRH-CF-internal='TERM=xterm ssh -p 22 root@192.168.71.91'

The trick is the bold part: TERM=xterm (which you can also replace by export TERM=xterm; if you want future ssh sessions to use the same [wayback] TERM setting).

The reason is that the Mac defines the TERM variable as containing xterm-256 which is defined on the Mac itself, but ESXi has a hard time coping with it.

Some Mac OS and Xcode combinations had a problem with xterm-256 not being present ([WayBackmacos – Terminal strangeness after installing Xcode on Lion – Super User), but this isn’t the case on my system:

$ ls -alh `find /usr/share/terminfo | grep 'xterm-256color'`
-rw-r--r-- 1 root wheel 3.2K Jul 30 2016 /usr/share/terminfo/78/xterm-256color

On the Mac you really want to use xterm-256color as it looks way better than xterm-color or xterm: [WayBacklinux – What is the difference between xterm-color & xterm-256color? – Stack Overflow (thanks [WayBack] Chris Page!)

It seems I already did something similar on ESXi itself to get esxtop working: ESXi: when esxtop shows garbage. That was on the ESXi side and works as well for this problem too.

However, it is a bit harder to have a script run during ESXi boot time that sets this, so it is easier to fix this on the Mac side.

It works for all OS X and ESXi versions I’ve tested so far.

–jeroen


Viewing all articles
Browse latest Browse all 250

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>