Basically when you run an interactive program on the server you need to use
ssh -t instead of
ssh. For example:
ssh -t user@server top.
This doesn't work:
ssh user@server top.
Question is: Why does ssh need a server-side tty for such programs? Is it possible to directly pipe data streams between the server program and the client side tty?
To add some details, we know the tty can multiplex stdout and stderr onto a single stream. This means if you run
ssh -t then on the client side you won't be able to tell the difference between stdout and stderr, and to pipe them separately. Therefore I think a server-side tty in between breaks some of kind of transparency. It'd be nice if ssh makes running server-side programs exactly the same experience as if those programs were local.