Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could web-console support the vi or other txt edit tools ? #4

Open
Quanjiang opened this issue Oct 26, 2014 · 3 comments
Open

Could web-console support the vi or other txt edit tools ? #4

Quanjiang opened this issue Oct 26, 2014 · 3 comments
Projects

Comments

@Quanjiang
Copy link

Hi !

Very great plug to get access via web to ssh.

But I can't use it to open vi. Could you help me to get that ?

@achrelam
Copy link

Hello !

First, i want to let you know that you made a Great work !

I also have the same question, how to use the text editor's function (vim or other) ?

Regards,
Achrelam

@xjose97x
Copy link

Anybody was able to figure this out?

@jnvsor
Copy link
Contributor

jnvsor commented Nov 5, 2016

I'm going to try and make a brief write-up to explain what web-console actually does and link it to most of the other open issues which are all making the same assumption.

Long story short: It's pretending to be a shell. It's not a real shell, but it's close enough for most purposes.

When you type in a command, you send the command to the server, along with an authentication token and the current working directory. The server will then change to that directory and execute the command and return the output, which is what you see show up in your terminal.

Knowing this there's a list of things that obviously won't work:

  • Since it's running from the webserver, it has the same permissions as the webserver. Unless your webserver's user is in the sudoers file (which is a very bad thing TM) you can't use sudo.

  • Since it's a single request, anything requiring an open connection isn't going to work

    • Text editors
    • Top
    • Opening another shell (Not that you actually had a real shell to begin with!)
    • Control characters (^C for example)

    While you might be able to get something like this working with a convoluted websockets system, it wouldn't do you much good because...

  • Since it's an ordinary webscript, it's going to timeout whenever the server says it will. If your servers php max_execution_time is 10 seconds, anything you execute will be killed 10 seconds in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Web Console
To Reply
Development

No branches or pull requests

4 participants