Apps :: Vi Question



Thanks for the info guys. I have used the arrow keys many times before without problems, not sure what the deal was this time. But when I ssh to the red hat server at school and edit a file there using vi, I always run into the problem with the backspace. This problem doesnt seem to exist if I am using putty to connect from a windows machine. Is this some kind incompatibility issue?
When you run ssh, try using the "-t' option to force a pseudo tty allocation.  This may solve your problem.  Below is information from the man page for ssh describing what the "-t" option does:

Quote
   -t      Force pseudo-tty allocation.  This can be used to execute arbitrary screen-based programs on a remote machine, which can be  very useful, e.g., when implementing menu services.  Multiple -t options force tty allocation, even if ssh has no local tty.

RHTopics, thanks for the suggestion. Unforunately the '-t' didnt seem to make a difference.
Ok, I have finally had a little time to do some digging around and this is what I found out. As far as I can tell my problem is a tty configuration mismatch. On the Red Hat server that I am logging into for school 'stty -a' responds with (among other things), 'erase = ^H;'
In dsl running the same command the erase portion of the output reveals 'erase = ^?;' this seems to be the reason why when I backspace on the Red Hat server I am getting '^?' instead of it actually backspacing.
So I now know what the reason is for this, but dont really know what the best way to go about correcting this is...

EDIT:
It seems like I can set this using 'stty erase NN' (with NN being something like '^?' or '^H'), although I dont really understand the difference between the two or what ramifications this will have on the system.

I used 'ssty erase ^?' while logged into the red hat server and it corrects the problem. It only lasts that session, so it looks like I will need to do it everytime I log in, but I can deal with that. Just thought I would post in case someone runs into this in the future.
Next Page...
original here.