0

Basically when you run an interactive program on the server you need to use ssh -t instead of ssh. For example:

  • This works: 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.

  • 1
    Related - serverfault.com/questions/593399/…. – slm Jul 30 '18 at 0:39
  • @slm I saw this one, but it was answering why without -t is better than with -t, kind of the opposite to this question. – Cyker Jul 30 '18 at 1:21
  • Yeah it's the opposite of your Q but in explaining the reverse explains your Q, at least IMO. – slm Jul 30 '18 at 1:22
  • The explanation in that question favors without -t, but the fact is, there is -t, so there must something not covered in that question that favors -t, right? – Cyker Jul 30 '18 at 1:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.