Liste des Groupes | Revenir à cu shell |
In article <vqv1c0$3gq75$1@dont-email.me>,
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:On 13.03.2025 14:01, Dan Cross wrote:>In article <vquhba$3817f$1@dont-email.me>,>
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:The question occurred to me whether it would be possible to remotely
execute a command as if started from another shell session *in* that
shell session.
I don't think I understand what you mean. Do you mean that you
would be able to hijack a user's TTY in order to run commands on
some other system (e.g., via `ssh` or something) as them?
Actually that question arose after a necessary reboot of my system,
which had shown a strange effect[*] and was unusable. - I wanted to
obtain from my shell sessions some information, and since I happen
to have dozens of shell windows open in parallel - and I considered
it boring to go through all virtual windows with all it's individual
shell windows - I thought about starting that request on each window
uniquely from one shell window. That's how it started why I pondered
about the question and tried a couple things.
>
So, no; no hijack intended, no other users concerned. (I'm the only
user on my system, or so I hope.) It was at that point actually an
academical question.
>
I think I understand; let me paraphrase, and tell me if I'm
correct?
>
I think you're asking if you can write to a terminal device, and
have what you write be treated as input data for whatever
program is running on that tty/pty; is that right? And then, if
that is possible, whether you can do this over the network?
>
So that, for example, if you have a terminal emulator with a
window that is running some shell process, controlled by some
pty device, you could execute a command on that computer over
the network that would get the shell running in that window
run some command?
>
If that's correct, then the answer, generally is no: you can't
do that. If you open the pty device associated with that shell,
you're and write to it, you're really writing to the same
output that the shell process is connected to, not it's input.
>
There's no simple way to interpose onto the input stream.
Les messages affichés proviennent d'usenet.