When I ssh to my my remote server, a solaris machine running SunOS 5.9 with C-shell as default login shell I have the following issues:
- TERM variable is not defined: I need to manually set this variable to xterm to be able to edit files, else I have an unfriendly message:
I don't know what kind of terminal you are on - all I have is 'xterm-256color'.
- keyboard is not well recognized:
- backspace clean the complete command line buffer. I found a solution here
- tab does a tab, not autocomplete
- del key puts junk in the console buffer (^[[)
- arrow keys put junk in the console buffer (^[) and insert A, B, C, D instead of moving the cursor within vi.
- probably more
I've found some way to fix the backspace by using the stty command (here: Backspace, Tab not working in terminal (using ssh)), but I need a complete remap of the keyboard...
How can I setup my ssh session to fix both the term issue and the keyboard issue at login time ?
PS: The remote 'user' is a 'shared' account used by all developers and where is located our backend distribution. I don't want to touch the .*rc script to avoid any undesired side effects