When you SSH into a Linux machine from Leopard the backspace key doesn't behave correctly.
Pressing backspace will delete characters in front of the cursor and pressing fn+backspace will do nothing.
To fix this irritating behaviour do the following:
- Enter the terminal preferences -> settings -> advanced and check 'Delete sends Ctrl-H'
- Add the following line to your .profile:
stty erase ˆH
Since ˆH is a non-printable control character, the easiest way to do this is to execute the following command:
echo -e "stty erase ˆH" >> ~/.profile
Type the ˆH by pressing Control-V and Control-H.
- Add the following line to your .inputrc:
"\e[3~": delete-char
- Apply changes by doing a
source ~/.profile
and a bind -f ~/.inputrc
.
This (edited) tip can be found here: http://fredericiana.com/2006/10/16/fixing-backspace-and-delete-for-ssh-in-os-xs-terminalapp/
BTW: Apple should add a delete key to the Macbook keyboard...