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
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 > > > On 2/14/18 5:32 AM, Lancelot Mak wrote: > > do u have any recommendation on module to use? what i wanted is to login > ssh using username,

Re: ssh::command

2018-02-13 Thread Илья Рассадин
Try to look at Net::SSH::Any https://metacpan.org/pod/Net::SSH::Any On 2/14/18 5:32 AM, Lancelot Mak wrote: do u have any recommendation on module to use? what i wanted is to login ssh using username,password but in script no key, no non-interactive thanks On 13 February 2018 at 23:38, Chas.

Re: ssh::command

2018-02-13 Thread Lancelot Mak
do u have any recommendation on module to use? what i wanted is to login 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 >> >> use SSH::C

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); > > $cmdlog = ssh_execute( > host => $cmdhost, > usernam

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; > > $cmdln = `grep $ARGV[0] list.tx

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 => "$ARGV[1]", ); print $cmdlog; print

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 > full reply

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