Você teria que usar o sinalizador -t
.
Exemplos:
ssh -t me@server 'nano my_file.txt'
ssh -t me@server 'open_nano.sh'
Explicação de man ssh
:
-t Force pseudo-tty allocation. This can be used to execute arbi‐ trary 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.