Re: ssh::command

2018-02-19 Thread Lancelot Mak
thx for the msg. but I 'm not looking for cfg mgmt tools. On 19 February 2018 at 18:41, Alex Mestiashvili wrote: > On 02/14/2018 08:48 AM, Lancelot Mak wrote: > > thanks for the help. > > it works. > > > > On 14 February 2018 at 13:33, Илья Рассадин > > wrote: > > >

Re: ssh::command

2018-02-19 Thread Alex Mestiashvili
On 02/14/2018 08:48 AM, Lancelot Mak wrote: > thanks for the help. > it works. > > On 14 February 2018 at 13:33, Илья Рассадин > wrote: > > Try to look at Net::SSH::Any https://metacpan.org/pod/Net::SSH::Any > > > >

Re: ssh::command

2018-02-13 Thread Lancelot Mak
t; ssh using username,password but in script > no key, no non-interactive > > thanks > > On 13 February 2018 at 23:38, Chas. Owens wrote: > >> On Tue, Feb 13, 2018 at 1:19 AM Lancelot Mak >> wrote: >> >>> #!/usr/bin/perl -W >>> >&g

Re: ssh::command

2018-02-13 Thread Илья Рассадин
. Owens <mailto:chas.ow...@gmail.com>> wrote: On Tue, Feb 13, 2018 at 1:19 AM Lancelot Mak mailto:lancelot@computer.org>> wrote: #!/usr/bin/perl -W use SSH::Command; $cmdln = `grep $ARGV[0] list.txt`; chomp($cmdln); ($cmdh

Re: ssh::command

2018-02-13 Thread Lancelot Mak
t; host => $cmdhost, >> username => $user, >> > password => $p,, i >> > command => "$ARGV[1]", >> ); >> >> >> print $cmdlog; >> >> print "\n"; >> > > Testing on a Mac OS machine, the I found it consistently prints

Re: ssh::command

2018-02-13 Thread Chas. Owens
On Tue, Feb 13, 2018 at 1:19 AM Lancelot Mak wrote: > #!/usr/bin/perl -W > > use SSH::Command; > > $cmdln = `grep $ARGV[0] list.txt`; > chomp($cmdln); > ($cmdhost,$user,$pass) = split(':',$cmdln); > $p = `echo $pass|base64 -d`; > chomp($p); > >

Re: ssh::command

2018-02-13 Thread Shlomi Fish
Hi Lancelot, some comments on your code: On Tue, 13 Feb 2018 17:19:03 +0800 Lancelot Mak wrote: > #!/usr/bin/perl -W > 1. don't use -w - http://perl-begin.org/tutorials/bad-elements/#the-dash-w-flag 2. use strict and warnings instead. > use SSH::Command; > > $c

Re: ssh::command

2018-02-13 Thread Lancelot Mak
#!/usr/bin/perl -W use SSH::Command; $cmdln = `grep $ARGV[0] list.txt`; chomp($cmdln); ($cmdhost,$user,$pass) = split(':',$cmdln); $p = `echo $pass|base64 -d`; chomp($p); $cmdlog = ssh_execute( host => $cmdhost, username => $user, password => $p, command => "$A

Re: ssh::command

2018-02-13 Thread Chas. Owens
Can you simplify your code to a short program that had the issue and post it? Often the act of shortening the program reveals the problem on its own. On Mon, Feb 12, 2018, 22:37 Lancelot Mak wrote: > Hi all, > I am using SSH::Command module to do ssh stuff but it does not return

re: ssh::command

2018-02-12 Thread Lancelot Mak
Hi all, I am using SSH::Command module to do ssh stuff but it does not return full reply from server. Any clue? It just returns part of it. Is it timeout? or what? Thanks. -- -- Lancelot Mak

Re: Can not run ssh command inside perl script !

2012-08-31 Thread Shlomi Fish
Hello Jack, On Fri, 31 Aug 2012 17:00:12 +0700 Jack Vo wrote: > Hello List, > > I'm trying to execute a script which retrieves swap usage memory in > remote host. So that I install Net::SSH::Perl module (from source > code) from CPAN website. > My script below : > > #!/usr/bin/perl -w > > use

Can not run ssh command inside perl script !

2012-08-31 Thread Jack Vo
Hello List, I'm trying to execute a script which retrieves swap usage memory in remote host. So that I install Net::SSH::Perl module (from source code) from CPAN website. My script below : #!/usr/bin/perl -w use strict; use Net::SSH::Perl; my $hostname = "192.168.7.5"; my $username = "abcd";