0

I have a strange problem. IT changed the VPN to a newer Cisco device. After connecting to the VPN, I can ssh to one of our corporate server. I can ls, cd, cat, sudo. BUT if I tried any editing using vi or vim My terminal is just blank/black - seem to be hung. Nano seems ok.

I'm currently using Windows 10 + Cygwin connecting to a Ubuntu 18.04.4 LTS. The VPN is using Windows 10 built-in L2TP/IPsec with pre-shared key

Before IT changed the VPN, editing seems to be ok. I notified IT, but they don't know what causing it. What should I do/try to avoid this issue?

6
  • What's the value of $TERM when you start vi? – Gerard H. Pille Aug 1 '20 at 18:25
  • @GerardH.Pille echo $TERM xterm – RonPringadi Aug 1 '20 at 20:45
  • 1
    I was wondering if vi would be sending a control sequence that blocked your terminal, but with vim it should start a new window. Is the sshd configured for X11 tunneling? Do you start ssh with "-X" or "-Y" ? – Gerard H. Pille Aug 2 '20 at 9:30
  • @GerardH.Pille I normally don't use -X nor -Y. Today I tested with -X and/or -Y still the same issue. cat /etc/ssh/sshd_config |grep -i x11 X11Forwarding yes #X11DisplayOffset 10 #X11UseLocalhost yes # X11Forwarding no – RonPringadi Aug 3 '20 at 5:07
  • vim should be started "nohup vim &", and your terminal should be available immediately, while vim should open in a new window. Any errors will be reported to nohup.out. – Gerard H. Pille Aug 3 '20 at 10:11
0

It's very unfortunate that I stuck on this issue for quite sometime, but I managed to at least find the source of the problem. Something or someone, changed the default stty.

I had to add stty sane into my .bashrc to reset it immediately after a login. And after that vi/vim/nano seem to work fine. No random hangs anymore.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.