Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

net ssh perl not working

by hi5.ankit (Initiate)
on Sep 23, 2010 at 06:10 UTC ( #861451=perlquestion: print w/ replies, xml ) Need Help??
hi5.ankit has asked for the wisdom of the Perl Monks concerning the following question:

I need to execute commands over host using net ssh perl. but the host gives error in example cmd.pl. Error states:

 Can't open more than one channel.

I think this is due to restriction imposed on the host which i can't alter. So i made some changes in the ssh2.pm. In ssh2.pm, two channels are opened one is for confirmation after login and the other one is when command is passed on. I deleted the code which opens a channel for confirmation and now only one channel is opened which is at the time when command is passed.

This way i was able to get away with the channel problem, but now i recieve error stating:

 wrong channel id recieved.

Please help in the issue.

Comment on net ssh perl not working
Select or Download Code
Re: net ssh perl not working
by Anonymous Monk on Sep 23, 2010 at 06:16 UTC
    You can't be serious
Re: net ssh perl not working
by RyuMaou (Deacon) on Sep 23, 2010 at 13:39 UTC
    Showing the actual code you used is more likely to get you helpful answers.

    Can I suggest you check out How do I post a question effectively? It really will help, for instance, if you update your question with more information than you've given us so far and include code.
    I haven't worked with Net::SSH myself, but I'm sure plenty of folks have who can help if they get enough information to help.

    Good luck!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://861451]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2014-09-20 01:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (151 votes), past polls