Re: How can I open a remote ssh session with perl

2010-09-09 Thread S Pratap Singh
I am stuck with this issue does any one have any idea about this ... This code(given below) is working fine for all the command but for some command it is not able to print the output. I am getting the following output == w 52 column window is too narrow Output of the same comm

Re: How can I open a remote ssh session with perl

2010-09-02 Thread S Pratap Singh
This code(given below) is working fine for all the command but for some command it is not able to print the output. I am getting the following output == w 52 column window is too narrow == Similarly for top it is not printing all the field . top -cd2 top - 20:36:28

Re: How can I open a remote ssh session with perl

2010-09-01 Thread Salvador Fandino
On 08/27/2010 05:47 AM, S Pratap Singh wrote: > Hello Peter , > > Did you try executing command "top -cd2", "iostat 1", vmstat 1 10" etc ? Did > you get the output of those command ? I am not getting the output of these > commands rest works fine for me. use Net::OpenSSH; my $ssh = Net::Open

Re: How can I open a remote ssh session with perl

2010-09-01 Thread Salvador Fandino
On 08/25/2010 07:51 PM, C.DeRykus wrote: > On Aug 24, 12:28 pm, frase...@gmail.com (Brian Fraser) wrote: >> On Tue, Aug 24, 2010 at 11:08 AM, Peter Scott wrote: >>> CPAN: Net::SSH::Perl . >> >> I had a similar issue not too long ago; Spent a couple of days attempting to >> get Net::SSH::Perl to co

Re: How can I open a remote ssh session with perl

2010-08-28 Thread Peter Scott
On Sat, 28 Aug 2010 11:55:01 +0530, S Pratap Singh wrote: > Is there any way I can get these interactive output via my script or I > am missing something? .. Thanks for your continued help. > > I need to get those interactive outputs to my script or is there any way > to open a psuedo terminal. I

Re: How can I open a remote ssh session with perl

2010-08-27 Thread S Pratap Singh
Hello , Is there any way I can get these interactive output via my script or I am missing something? .. Thanks for your continued help. I need to get those interactive outputs to my script or is there any way to open a psuedo terminal. I do not want to execute command on server it should be exam

Re: How can I open a remote ssh session with perl

2010-08-27 Thread Peter Scott
On Fri, 27 Aug 2010 09:17:22 +0530, S Pratap Singh wrote: > Hello Peter , > > Did you try executing command "top -cd2", "iostat 1", vmstat 1 10" etc ? > Did you get the output of those command ? vmstat 1 10 works for me; pstree works; but of course you're not going to run top -cd2 this way, th

Re: How can I open a remote ssh session with perl

2010-08-26 Thread S Pratap Singh
Hello Peter , Did you try executing command "top -cd2", "iostat 1", vmstat 1 10" etc ? Did you get the output of those command ? I am not getting the output of these commands rest works fine for me . Pstree, I am getting partial output Here is the output at my end of pstree command ===

Re: How can I open a remote ssh session with perl

2010-08-26 Thread Peter Scott
On Thu, 26 Aug 2010 11:22:29 +0530, S Pratap Singh wrote: > Here is my code which logs in and performs some task but it does not > show the output of top and pstree command what would i do to get the > output of these commands along with vmstat and iostat > > #!/usr/bin/perl -w > use Net::SSH::Per

Re: How can I open a remote ssh session with perl

2010-08-26 Thread S Pratap Singh
> Hello , > Thanks Shlomi for valuable giving input on my code I will implement that > too. > > But still my question remains same is it possible to open a remote session > with perl and get the output of "top", "vmsate 1 10", "iostat 1" , "yum > install etc", etc .. > > > I am not getting the outp

Re: How can I open a remote ssh session with perl

2010-08-26 Thread Shlomi Fish
Hi Pratap, a few comments on your code. I'm not sure they will help with anything, but they are still appropriate. On Thursday 26 August 2010 08:52:29 S Pratap Singh wrote: > Here is my code which logs in and performs some task but it does not show > the output of top and pstree command what wou

Re: How can I open a remote ssh session with perl

2010-08-25 Thread S Pratap Singh
Here is my code which logs in and performs some task but it does not show the output of top and pstree command what would i do to get the output of these commands along with vmstat and iostat #!/usr/bin/perl -w use Net::SSH::Perl $host = '192.168.3.36'; $username = 'root'; $login_passwd = 'passwor

Re: How can I open a remote ssh session with perl

2010-08-25 Thread C.DeRykus
On Aug 24, 12:28 pm, frase...@gmail.com (Brian Fraser) wrote: > On Tue, Aug 24, 2010 at 11:08 AM, Peter Scott wrote: > > CPAN: Net::SSH::Perl . > > I had a similar issue not too long ago; Spent a couple of days attempting to > get Net::SSH::Perl to compile properly, gave up, went to CPAN, found >

Re: How can I open a remote ssh session with perl

2010-08-24 Thread Agnello George
On Wed, Aug 25, 2010 at 12:58 AM, Brian Fraser wrote: > On Tue, Aug 24, 2010 at 11:08 AM, Peter Scott wrote: > > > > CPAN: Net::SSH::Perl . > > I had a similar issue not too long ago; Spent a couple of days attempting > to > get Net::SSH::Perl to compile properly, gave up, went to CPAN, found >

Re: How can I open a remote ssh session with perl

2010-08-24 Thread Brian Fraser
On Tue, Aug 24, 2010 at 11:08 AM, Peter Scott wrote: > CPAN: Net::SSH::Perl . I had a similar issue not too long ago; Spent a couple of days attempting to get Net::SSH::Perl to compile properly, gave up, went to CPAN, found [Net::SSH::Expect][0]; So far so good, so here's a recommendation. [0]

Re: How can I open a remote ssh session with perl

2010-08-24 Thread Peter Scott
On Tue, 24 Aug 2010 14:25:01 +0530, S Pratap Singh wrote: > I know how to run command on remote shell using script , but I want to > open remote shell using perl and want to run the command manually and > terminate the session when I am done as we normally do with shell . CPAN: Net::SSH::Perl .