KpyM Telnet/SSH Server - Forum
Runing Remote Commands with KpyM
Elessar Runing Remote Commands with KpyM
Does KpyM support the running of remote commands using SSH like ssh server do?

It currently doesn't seem to work but i wonder if the nag screen is currently causing the problem.

I want to have some scripts that run from a central linux server that runs commands on several client (windows) boxes

Kroum Grigorov
> Does KpyM support the running of remote commands using SSH like ssh server do?

KTS supports "terminal" sesions only, so you will be unable to run your scripts directly through SSH.

You might consider using some SSH scripting tool(for ex Paramiko) or switch to another SSH server.

You might find these usefull on scripting KTS


thank you, While i didn't use Paramiko (Python and i don't get along that well) it made me think to look for a perl equivalents.

(it was also necessary to remove the nag screen. (i didn't want to purchase it without knowing it worked but i lucked out))

I used the perl Net::SSH2 module.

NOTE this code i pieced from several different places online

use Net::SSH2;

my $ssh2 = Net::SSH2->new();
$ssh2->connect('computer.address') or die;

#both public-key and password login work
if ($ssh2->auth_publickey('administrator','/root/.ssh/','/root/.ssh/id_rsa')){
#if ($ssh2->auth_password('administrator','admin's_pass')) {

my $chan2 = $ssh2->channel();

#this shouldn't be needed but KpyM is a little slow
#so this is needed can be 3
sleep 5;

#kill IE this is just to show it working
#note /n isn't a newline in windows
print $chan2 "taskkill /F /IM iexplore.exe\r\n";
print "LINE2: $_" while <$chan2>;

#this is needed to have the terminal session end nicely
print $chan2 "exit\r\n";

} else {
warn "auth failed.\n";

Mariam McGaw
thanks DEAR

Runing Remote Commands with KpyM is a nice post with the complete detail that we want to know about. If we can read a writer reviews about it, we can find more and more ideas that can help us when we read about it.

This is a very interesting document. Me and my friends have read them and find them really helpful. I will refer more about this article. Thanks. <a href="">surviv io</a>


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