in reply to Re: a perl program to create two way connection with the server
in thread a perl program to create two way connection with the server

say for example i want to reboot the server, is it possible with net::open::ssh

  • Comment on Re^2: a perl program to create two way connection with the server

Replies are listed 'Best First'.
Re^3: a perl program to create two way connection with the server
by Anonymous Monk on Mar 18, 2015 at 13:11 UTC

    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;
    A reply falls below the community's threshold of quality. You may see it by logging in.
Re^3: a perl program to create two way connection with the server
by salva (Canon) on Mar 18, 2015 at 13:12 UTC
    How is that related to bidirectionality?

    Your questions are unclear. Take your time to fully describe your problem, the environment and what you are trying to achieve and then we may be able to help you.

      hey yes very true am completely unclear on the topic myself. am learning my way through. I will make my questions even more clearer in the coming future