So is this thread about "two-way connections" or is it a repeat of your last two threads reboot a system (machine or server) multiple times with perl script?
Anyway, yes, it is possible, given that the user you are connecting to the server with has the permissions to do so (via sudo or directly). A quick, untested copy & paste from the Net::OpenSSH docs, which you should read:
use Net::OpenSSH; my $ssh = Net::OpenSSH->new($host); $ssh->error and die "Couldn't establish SSH connection: ".$ssh->error; $ssh->system("sudo reboot") or die "remote command failed: ".$ssh->error;
In reply to Re^3: a perl program to create two way connection with the server
by Anonymous Monk
in thread a perl program to create two way connection with the server
by irthiza90
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |