KpyM Telnet/SSH Server - Forum
How do I execute a remote command instead of a shell?
Mark Lehrer How do I execute a remote command instead of a shell?
 
With the standard linux openssh server, you can remotely execute a command and get back the output and return code, e.g.:

localhost$ ssh mark@server ls -l /bad/path
ls: cannot access /bad/path: No such file or directory
localhost$ echo $?
2
localhost$


However, when I try to do this with the Windows server running kpym, it logs in but it just freezes when it should be executing the command.

Is this not a supported feature, or am I just doing it wrong? This is an essential function for automating things.

Thanks,
Mark


Kroum Grigorov
 
> Is this not a supported feature, or am I just doing it wrong?

Not supported, only interactive sessions are implemented.

> This is an essential function for automating things.

Some people tried using expect/paramiko scripts or something similar, but I do not know how good this worked for them.

Kroum


 

© 2007 - 2008 Kroum Grigorov
Powered by phpBB © 2001, 2005 phpBB Group