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

calling ssh from webuser #38

Open frank-w opened 6 years ago

frank-w commented 6 years ago

hi,

i got webconsole running (same user as lighttpd=www-data)

now i try to connect to localhost via ssh:


user@bananapi /$ ssh -tt -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no frank@localhost
Warning: Permanently added 'localhost' (ED25519) to the list of known hosts.
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password). 

tried with -v param to ssh:


debug1: Next authentication method: password
debug1: read_passphrase: can't open /dev/tty: No such device or address
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
debug1: read_passphrase: can't open /dev/tty: No such device or address
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.
debug1: read_passphrase: can't open /dev/tty: No such device or address
debug1: Authentications that can continue: publickey,password
debug1: No more authentication methods to try.
Permission denied (publickey,password). 

it seems that the problem exists because it's not a real terminal...

any idea to get it working?

Regards Frank

robercik10192 commented 6 years ago

It's rather impossible to use ssh on web-console

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 is possible to add support for this?