in reply to Re: connecting via SSH
in thread connecting via SSH

I'm really stuck.
I've declared port as you suggested but when i start my script it responds:
Your Vendor has not defined Fcntl macro F_SETFL, used at c:/Perl/site/lib/Net/SSH/Perl.pm line 218
Which "Vendor" does it mean?? I can't understand the meaning...

Replies are listed 'Best First'.
Re^3: connecting via SSH
by ikegami (Patriarch) on Mar 14, 2006 at 16:55 UTC

    That error means the OS doesn't support it that flag for fnctl, and that Perl doesn't emulate it. I don't know if that helps, but newer version of Net::SSH::Perl don't use F_SETFL.

    Older version (<= 1.26):

    fcntl($sock, F_SETFL, O_NONBLOCK) or die "Can't set socket non-blocking: $!";

    Newer version (>= 1.27):

    defined($sock->blocking(0)) or die "Can't set socket non-blocking: $!";
Re^3: connecting via SSH
by izut (Chaplain) on Mar 14, 2006 at 16:14 UTC

    Check if you have the module Fcntl. I think it is installed with Perl by default. Btw, are you using Active State or Cygwin's Perl?

    Igor 'izut' Sutton
    your code, your rules.

      Yes, Fcntl is installed by default.
      As a matter of fact if i write into the prompt: perl -e "use Fcntl;" it doesn't give me errors....
      I use Active State distribution...
      Any suggestions?
      Thank you all!
Re^3: connecting via SSH
by ikegami (Patriarch) on Mar 14, 2006 at 17:00 UTC
    fcntl is not very portable. That's why you get on an OS that support a particular fcntl flag and an fcntl that doesn't emulate it.

    ("Vendor" refers to the OS.)