nickola / web-console

:desktop_computer: Simple web-based shell in your browser (outdated)
https://nickola.ru/projects/web-console
1.55k stars 350 forks source link

SSH to another computer #39

Open thiago-paz opened 6 years ago

thiago-paz commented 6 years ago

Hi,

I'm trying connect another computer through ssh... but i receive this error:

user@192.168.56.32 ~$ sudo ssh -o StrictHostKeyChecking=no -t -t ubuntu@192.168.56.11 Permission denied, please try again. Permission denied, please try again. Permission denied (publickey,password).

I already edit my /etc/sudoers inserting this line: www-data ALL=(ALL) NOPASSWD: ALL

user@192.168.56.32 ~$ sudo id uid=0(root) gid=0(root) groups=0(root)

How can I access another host through ssh using Web Console?

Thanks

robercik10192 commented 6 years ago

You can't

When Web Console executes command on the web server side, it is waiting for command result (output) and sends that result back to you. So, if your command is waiting for some input (like vi / vim) or executes something infinitely (like ping) you can't directly send input (or CTRL-C) to that kind of commands using Web Console. As alternative, you can use sed text editor (see sed website) or tools like Expect that will pass required input to that kind of commands.

filips123 commented 6 years ago

Is it possible to add support for this?

nhalstead commented 5 years ago

In its current config, no. If you are looking to do a live console interaction like you are mentioning, something like putty but in the browser, I would checkout codeanywhere as it supports what you are asking for. I use this all the time to do development without the restrictions as you can edit, copy, move, upload, download files all by piggybacking on an SSH session. Really saves time from having to install of the common tools I use on many computers, I just use the web site and chrome and I'm off to the races.