go ahead... be a heretic | |
PerlMonks |
Net::SSH2 Connect - Does not return errorby msk_0984 (Friar) |
on Oct 08, 2007 at 10:34 UTC ( [id://643438]=perlquestion: print w/replies, xml ) | Need Help?? |
msk_0984 has asked for the wisdom of the Perl Monks concerning the following question:
Respected Monks, It made my task easier and fekt happy when I came to know about the new Net::SSH2 perl module. I have implemented this modules into my CGI application which connects to remote system and performs some execution of commands or else editing and saving of files. I have initially tested the module with a sample perl script and could capture all the errors which could be generated during the process. Here is the part of the code where we are trying to connect. Where ip -> is the remote systems IP
For eq: When SSH service is down on the remote system the error occured is
I felt the error can be captured and have used the same in my CGI application and when ever the SSH service is down for a remote system. I am not able to capture the error, but it is being obtained in the /var/apache/logs/error_log file
Here is the part of the code where I am trying to connect in my CGI application.
I have used "return" but did not find any luck and tried out die also but unable to print this error on the CGI interface. I need to display this error message for more readability to the user.
Please help me out if I am doing any thing wrong over here. Need your suggestions if any Thanks in advance.
Sushil Kumar
Back to
Seekers of Perl Wisdom
|
|