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?

RonPringadi
  • 153
  • 1
  • 6
  • What's the value of $TERM when you start vi? – Gerard H. Pille Aug 01 '20 at 18:25
  • @GerardH.Pille `echo $TERM` `xterm` – RonPringadi Aug 01 '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 02 '20 at 09: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 03 '20 at 05: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 03 '20 at 10:11
  • In your ssh connection, does `echo $DISPLAY` return anything, or is it empty? I agree that it's a very odd problem! – filbranden Aug 21 '20 at 04:54

1 Answers1

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.

RonPringadi
  • 153
  • 1
  • 6