ssh machineb "vim /etc/sysconfig/iptables"
I get the following as a transient message:
Vim: Warning: Output is not to a terminal
Vim: Warning: Input is not from a terminal
Then, I see the file I requested, and it looks like I am editing it, except I can't input some characters, such as the ESC character. I see "^[" instead. Also, it looks like ENTER is now going down a line in the "vim over ssh" (as if I pressed j). Other weird things seem to happen too, I think I see a message about the file being readonly and something about "Process ID: XXXX (still running)" -- overlaid on top of my file. I only get out of this weird state by pressing Ctrl-Z.
Seems like maybe something like readline
is broken? Is this related to my shell's input and output files? If so, how?
Just a curious enthusiast, trying to understand what went down. Do you have any feelings about why this is a dumb thing to do that you'd like to tell me? Would it ever make sense to do something like this, and is there a way to achieve it more successfully?