Menu

#16 Handle interactive commands.

SVN
closed
nobody
None
8
2020-01-05
2015-04-08
No

I would like to know if it's possible to handle interactive commands.
Currently, if any command ask for keyboard input, a password for example, page reload last forever, until a browser/server timeout is reached.
Any hint will be welcome, as I could try to test/implement by myself.
Thanks.

Discussion

  • Wolfgang Dautermann

    Hi,
    No, that is not possible with PHPshell.

    There exists another open source project "shellinabox" (https://code.google.com/p/shellinabox/) where you can work interactively.

    Best regards, Wolfgang

     
  • Anonymous

    Anonymous - 2015-04-08

    Thanks for the link, but I would need a solution for a shared web hosting.
    Would it be possible a simple version with a predefined text input?
    I mean, if I just need to run a command that needs a password, give that password to executed process input on demand.
    For example, I am trying to execute a git push, but using a ssh with password.

     
  • Wolfgang Dautermann

    You can use I/O-redirects or pipes for providing input for commands in PHP shell ("command <inputfile" or "echo input | command").

    If a command really wants keyboard input (e.g. entering a password), expect (https://en.wikipedia.org/wiki/Expect) can solve your problem.

    Best regards, Wolfgang

     
  • Wolfgang Dautermann

    • status: open --> closed
     
  • Wolfgang Dautermann

    Close ticket, thats not possible with phpshell, alternatives were mentioned.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.