in reply to Re^5: Net::OpenSSH help needed
in thread Net::OpenSSH help needed

hi - thanks!!

cmd line with debug results in:
debug1: Authentication succeeded (password).
debug1: Entering interactive session.

and hangs 'till I kill it...

mean while I tried to reduce ssh timeout to 15 seconds
=> I can trap almost all of the cases now, but (grrrrr) sometimes the boxes don't wait for the minute and I'm back to the beginning.

no chance to work on the boxes for me...

Any idea how I can catch that issue within my program??

please...
:-)

and what's the meaning of that "-x2MN"?

thanks a lot for your help

Replies are listed 'Best First'.
Re^7: Net::OpenSSH help needed
by Mr. Muskrat (Canon) on Jul 30, 2013 at 20:11 UTC

    and what's the meaning of that "-x2MN"?

    -x enables X11 forwarding
    -2 forces ssh to only try protocol version 2
    -M places it into master mode for connection sharing
    -N tells it not to execute a remote command (just forward ports, only works with -2)

Re^7: Net::OpenSSH help needed
by salva (Canon) on Jul 30, 2013 at 20:51 UTC
    Can you post the exact line you are using to run ssh from the command line.

    The meaning of the x 2 M N flags is explained in detail on the ssh manpage.

      hi, -x2MN => sorry, my fault, thought it was ONE arguemnt... tststs...

      time ssh -o StrictHostKeyChecking=no -o ServerAliveInterval=30 -x2M -o NumberOfPasswordPrompts=1 -o PreferredAuthentications=keyboard-interactive,password -l willnotwork MYDEVICE

      Welcome
      willnotwork@MYDEVICE's password:
      invalid login or password
      password:
      Connection to MYDEVICE closed.

      real 2m4.753s
      user 0m0.009s
      sys 0m0.006s


      I typed pwd only ONCE!
      (Watch out - no N given!)




      time ssh -o StrictHostKeyChecking=no -o ServerAliveInterval=30 -x2MN -o NumberOfPasswordPrompts=1 -o PreferredAuthentications=keyboard-interactive,password -l willnotwork MYDEVICE

      Welcome
      willnotwork@MYDEVICE's password:
      invalid login or password
      password:




      I typed pwd only ONCE!
      and it hangs after that - and should be cought by timeout!
      Right?

      thanks for help
        try this one:
        time ssh -o StrictHostKeyChecking=no -l willnotwork -vvv MYDEVICE
        And post here the full output (you can replace sensitive information there).