简体   繁体   中英

Why can I not use the command history in minikube ssh

I have a minikube K8s 1 node cluster on my Windows 10 pc. I can SSH into this cluster using minikube ssh .

The problem that I am experiencing is that I can't use the arrow keys to bring back the previous command. I did some looking around and diagnostics:

  • set -o | grep history set -o | grep history gave history on
  • echo $HISTFILE gave /home/docker/.bash_history . This is indeed in the home folder of the user and the file was present after exit ing and executing minikube ssh again
  • echo $HISTSIZE and echo $HISTFILESIZE both gave 500
  • echo $SHELL gave /bin/bash

All these things tell me that command history should be enabled, but it doesn't seem to be the case. I tried using both Powershell and cmd to run minikube ssh , both with and without Windows Terminal.

Both PowerShell and cmd themselves have a working command history, but once SSHing using minikube, the history in the bash shell doesn't work.

Does anyone know how to get the command history to work after executing minikube shh ?

Edit: I have tried minikube ssh --native-ssh=false , but this didn't change anything.

It seems to be a problem with the SSH client you are using. You can try with the --native-ssh=false option:

minikube ssh --native-ssh=false

You can also try with different alternatives or with something like the ssh version that comes with Cygwin .

There is already an unsolved issue related to this . (Feel free to update)

✌️

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM