Why does ssh allocate a tty on server side?

Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
0
down vote
favorite
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.
ssh tty sshd pty
add a comment |Â
up vote
0
down vote
favorite
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.
ssh tty sshd pty
Related - serverfault.com/questions/593399/â¦.
â slmâ¦
Jul 30 at 0:39
@slm I saw this one, but it was answering why without-tis better than with-t, kind of the opposite to this question.
â Cyker
Jul 30 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 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 at 1:27
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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.
ssh tty sshd pty
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.
ssh tty sshd pty
edited Jul 29 at 23:32
asked Jul 29 at 23:06
Cyker
1,2651223
1,2651223
Related - serverfault.com/questions/593399/â¦.
â slmâ¦
Jul 30 at 0:39
@slm I saw this one, but it was answering why without-tis better than with-t, kind of the opposite to this question.
â Cyker
Jul 30 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 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 at 1:27
add a comment |Â
Related - serverfault.com/questions/593399/â¦.
â slmâ¦
Jul 30 at 0:39
@slm I saw this one, but it was answering why without-tis better than with-t, kind of the opposite to this question.
â Cyker
Jul 30 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 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 at 1:27
Related - serverfault.com/questions/593399/â¦.
â slmâ¦
Jul 30 at 0:39
Related - serverfault.com/questions/593399/â¦.
â slmâ¦
Jul 30 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 at 1:21
@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 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 at 1:22
Yeah it's the opposite of your Q but in explaining the reverse explains your Q, at least IMO.
â slmâ¦
Jul 30 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 at 1:27
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 at 1:27
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f459233%2fwhy-does-ssh-allocate-a-tty-on-server-side%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Related - serverfault.com/questions/593399/â¦.
â slmâ¦
Jul 30 at 0:39
@slm I saw this one, but it was answering why without
-tis better than with-t, kind of the opposite to this question.â Cyker
Jul 30 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 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 at 1:27