in reply to Re^3: Net::SSH::Perl ConnectTimeout (ssh -o option)
in thread Net::SSH::Perl ConnectTimeout (ssh -o option)

The easiest solution would probably be to just patch or to redefine the module debug function.

Another, less intrusive, option is to tie STDERR to an object that prepends the current time to every printed line.

Replies are listed 'Best First'.
Re^5: Net::SSH::Perl ConnectTimeout (ssh -o option)
by Anonymous Monk on Jan 22, 2015 at 19:40 UTC
    Thanks salva for the suggestions. I added the time() in the debug line as I not sure to tie time to STDERR. Suggestion welcome. As far as the timeout is concerned, issue is from
    sourceserver: Trying password authentication. to sourceserver: Login completed, opening dummy shell channel. (please no +te this obtained from a successful login attempt, without timeout) Taking too long to complete. Timed out after 60 seconds.
    I'm using following code to logon to target server:
    $ssh = Net::SSH::Perl->new($server, debug => 15, options=> [ "UserKnownHostsFile /usr/local/apps/.ssh/known_hosts"]);
    Is there other option I could use to debug this further? Thanks.
      I don't know. There could be some incompatibility/bug on the remote server. It announces itself as OpenSSH 4.3 so, it is quite old!

      As you seem to be on a Linux or Unix system my advice would be to use my module Net::OpenSSH. Net::SSH::Perl is mostly unmaintained nowadays and full of bugs.