Score:0

Running an application as part of the ssh command

am flag

I've got a custom application which works fine when run directly from the command line in Ubuntu VM or over SSH if I type the commands myself in the prompt.

If I run the same application by connecting to the Ubuntu over SSH (from Windows machine) and sending the command as part of the ssh command, the SSH console doesn't print any output from the application. The application (effectively a TCP server) seems dead as I can't connect to it at that point. However when I close the command prompt and effectively end the SSH session the application springs to life and I can connect to it, no problems!

When I run who in Ubuntu VM it doesn't list the SSH connection at all, but if I run ss -t -a I can see that the application is actually listening. Doing ps doesn't show the application running either.

Does it make any sense to anyone?

Bodo avatar
pt flag
Please [edit] your question and show the exact commands you run directly and using SSH and add details about the "custom application". Show the `ps` command you use. The application might run in the background in a separate process group, and you might need additional options for `ps`.
Score:0
am flag

It seem I forgot a few things when constructing the command. This one works as intended:

ssh -t [email protected] "sudo ./xyz.sh; exec bash -l"
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.