formigarafa / robotito

Terminal shell accessible through a jabber connection
MIT License
72 stars 18 forks source link

How I send Ctrl+C using Jabber client? #10

Closed Winthan closed 6 years ago

Winthan commented 6 years ago

is there command to send "ctrl + c"

formigarafa commented 6 years ago

please, have a look here and see if that's what you are looking for: https://github.com/formigarafa/robotito/blob/master/README.md#check-additional-available-options-with

Winthan commented 6 years ago

that doesn't answer the question. My question was how do you send Ctrl + C at terminal prompt.

formigarafa commented 6 years ago

Oh! I see. I thought you where talking about the daemon running on the server. So you want to know how to send a CRTL+C key combination using a Jabber client, right?

Usually, CTRL+C sends an INT signal to the current process. The problem you will find here is that Robo-TiTO waits until a command to finish to send you back the command output. So you have to wait for long running processes and, in the case of a interactive command you will end-up locked out.

I think what you asked for is quite useful, and I have been refactoring the code to accommodate something like that. Unfortunately, I am not there yet. But as a piece of advice, when possible I suggest using Robo-TiTO to start a SSH reverse tunnel (example: https://www.howtoforge.com/reverse-ssh-tunneling). That way you will have access to a proper full-featured terminal. The only requirement is that you have access to a ssh server publicly accessible from internet. I know that sometimes this is not possible, that's the reason I think what you asked is a good idea, but so far I could more easily work around the problem finding a publicly ssh available than making async threaded code and command that on jabber. Another thing, when I setup this server I make a cron job to restart it hourly or so that if one day anything happen to lock myself out then eventually I will regain access.