SSH to ESXI
-
A brief description When using SSH to an ESXi 5.5 or 6.0 host, the terminal doesn't seem to be responding properly. For instance, the up arrow for history always displays a capital A, and down is a capital B. If you hold the up or down arrows, they do start looping through the history.
-
Expected results Up arrow must show the last command (and navigate through history), not a capital A
-
Actual results (with terminal output if applicable) If pressed one time, up arrow in a ssh shell to an esxi host show a capital A
-
Your Windows build number 14393.447
-
Steps / All commands required to reproduce the error from a brand new installation Open a ssh session to an esxi host, and try to recall the last command with arrow key
ESXi seems to be missing a terminfo file for whatever reason
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2001448
I don't know how you pulled it up, but try doing export TERM=xterm in the ESXi session.
thanks for the answer, but i'm pretty sure this is not the issue.
If i connect, using cmder ssh, to the same esxi host, all is working as expected. If i connect using any ssh client on a linux machine to the same esxi host, all is working fine too. With putty, all is ok too.
The issue is only with ssh from bash on windows...
could you post the parameters in cmder you use?
no particular parameters... It's just a fresh cmder install ... just download cmder from here : http://cmder.net/
If you need some more infos, tell me
Hmmm. Cmder.. It introduces another possible variable. Could you tell us from bash.exe directly?
OK, let's eliminate cmder from the issue ...
I've download and install openssh windows client from here : http://www.mls-software.com/opensshd.html
And i include 2 screenshot :
- First one (openssh in cmd) is the result in a "cmd"' windows, using openssh windows client, it shows connection to an esxi host, a "ls" command launch, and the result of one keystroke on up arrow http://pix.toile-libre.org/?img=1480672887.png
- The second one is the same thing in bash http://pix.toile-libre.org/?img=1480672918.png
Could you do infocmp $TERM in bash.exe while ssh'd into ESXi and paste it here?
vince@GFI541541:/$``
infocmp $TERM
Reconstructed via infocmp from file: /lib/terminfo/x/xterm
xterm|xterm-debian|X11 terminal emulator, am, bce, km, mc5i, mir, msgr, npc, xenl, colors#8, cols#80, it#8, lines#24, pairs#64, acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, clear=\E[H\E[2J, cnorm=\E[?12l\E[?25h, cr=^M, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H, cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A, cvvis=\E[?12;25h, dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K, el1=\E[1K, flash=\E[?5h$<100/>\E[?5l, home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=^J, indn=\E[%p1%dS, invis=\E[8m, is2=\E[!p\E[?3;4l\E[4l\E>, kDC=\E[3;2~, kEND=\E[1;2F, kHOM=\E[1;2H, kIC=\E[2;2~, kLFT=\E[1;2D, kNXT=\E[6;2~, kPRV=\E[5;2~, kRIT=\E[1;2C, kb2=\EOE, kbs=\177, kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA, kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\EOP, kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf13=\E[1;2P, kf14=\E[1;2Q, kf15=\E[1;2R, kf16=\E[1;2S, kf17=\E[15;2~, kf18=\E[17;2~, kf19=\E[18;2~, kf2=\EOQ, kf20=\E[19;2~, kf21=\E[20;2~, kf22=\E[21;2~, kf23=\E[23;2~, kf24=\E[24;2~, kf25=\E[1;5P, kf26=\E[1;5Q, kf27=\E[1;5R, kf28=\E[1;5S, kf29=\E[15;5~, kf3=\EOR, kf30=\E[17;5~, kf31=\E[18;5~, kf32=\E[19;5~, kf33=\E[20;5~, kf34=\E[21;5~, kf35=\E[23;5~, kf36=\E[24;5~, kf37=\E[1;6P, kf38=\E[1;6Q, kf39=\E[1;6R, kf4=\EOS, kf40=\E[1;6S, kf41=\E[15;6~, kf42=\E[17;6~, kf43=\E[18;6~, kf44=\E[19;6~, kf45=\E[20;6~, kf46=\E[21;6~, kf47=\E[23;6~, kf48=\E[24;6~, kf49=\E[1;3P, kf5=\E[15~, kf50=\E[1;3Q, kf51=\E[1;3R, kf52=\E[1;3S, kf53=\E[15;3~, kf54=\E[17;3~, kf55=\E[18;3~, kf56=\E[19;3~, kf57=\E[20;3~, kf58=\E[21;3~, kf59=\E[23;3~, kf6=\E[17~, kf60=\E[24;3~, kf61=\E[1;4P, kf62=\E[1;4Q, kf63=\E[1;4R, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, khome=\EOH, kich1=\E[2~, kind=\E[1;2B, kmous=\E[M, knp=\E[6~, kpp=\E[5~, kri=\E[1;2A, mc0=\E[i, mc4=\E[4i, mc5=\E[5i, meml=\El, memu=\Em, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM, rin=\E[%p1%dT, rmacs=\E(B, rmam=\E[?7l, rmcup=\E[?1049l, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m, rs1=\Ec, rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7, setab=\E[4%p1%dm, setaf=\E[3%p1%dm, setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m, sgr0=\E(B\E[m, smacs=\E(0, smam=\E[?7h, smcup=\E[?1049h, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3g, u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?1;2c, u9=\E[c, vpa=\E[%i%p1%dd,
can you diff it with the same command in the local bash shell?
Also do it from the remote ssh that works correctly.
I didn't read correctly ... What i pasted above is the result from the local bash shell
when ssh'd, it returns the following error : -sh: infocmp: not found
@eliohann I don't know what distro ESXi runs in the root partition, but is there any way for you to obtain the ncurses-term package?
If not, could you try this from your local machine:
ssh b@B 'mkdir -p ~/.terminfo/x'
infocmp $TERM | ssh b@B 'cat > ~/.terminfo/x/xterm'
where b@B is the ESXi server. Then try reconnecting.
I thought ESXi had its own kernel; I thought it wasn't Linux at all? Though it has a Linux-based compatibility layer...
@aseering Kinda. It has some kind of Unix/Linux thing, and therefore it probably needs terminfo.
Hi,
@aseering : you're right, ESXi is not linux ... it's proprietary OS from VMWare Uname -a gives : VMkernel FRMONES003 6.0.0 #1 SMP Release build-3620759 Mar 3 2016 18:41:52 x86_64 x86_64 x86_64 ESXi
@fpqc : I tried what you suugest and the result is the same. One keystroke on up arrow gives A, if up arrow hold on, it starts to circle through commands history
Yeah sorry, I can't really help you debug this because I don't have a copy of ESXi. It seems like a terminfo problem, but maybe the MS team can help you more effectively.
Thanks for the discussion.
Closing this issue since:
- This issue is very old and has likely been fixed in recent Win10 builds
- This is the WSL issues repo, but this is an issue in Console which has its own Console GitHub Repo
- GitHub doesn't allow issues to be moved between repos, preserving posters' identity :(
If you have further asks/issues, please file new issues on our Console GitHub Repo.