|
Posted by Steve on 07/18/05 10:38
On Sun, 17 Jul 2005 21:00:56 -0700, glin@tollnz.co.nz wrote:
> hi guys,
>
> I need to create a page that execute a command on linux(ssh command) and
> then display whatever it comes up on the webpage. I don't know how to
> input the username after I execute the ssh command, can you help pls?
>
> Thanks in advance.
... that's 'cos you can't... easily ( user is simple, password isn't ).
Programs like expect will allow you to set something up, but it may well
be better to set up a dedicated login to run the command ( add in the
command instead of the shell in /etc/passwd, and add to /etc/shells ), and
the use ssh-keygen et al to make for a passwordless ssh to
<newuser>@<remotehost>
$0.02,
Steve
Navigation:
[Reply to this message]
|