sshreadlinesungridengine

ssh connection shows control keys as ^P or ^A


When I press ctrl-p it is displayed as ^P instead of recalling previous input line. Same goes for all the other readline control keys like ctrl-a (start of line). This happens with all the tools I use that have readline functionality built-in. Running the tools without ssh, works fine.

ssh server1 dc_shell     // BAD  ctrl-p is displayed as ^P
dc_shell                 // OK   ctrl-p recalls last line
ssh server1              // OK! I get a bash shell where ctrl-p recalls last line

Solution

  • Use -t ssh option (force pseudo-terminal allocation):

    ssh server1 -t dc_shell
    

    or add RequestTTY=yes to ~/.ssh/config