Hey monks,
I am new at using Net::SFTP, I am just trying to get the basics down. I have varified that I can connect to this host and port number using a windows sftp client called "WinSCP3". I really can't figure out why I get this error when I try to connect to the host computer:
Can't set socket non-blocking: Bad file descriptor at C:/Perl/site/lib/Net/SSH/Perl.pm line 213, <GEN0> line 1.
here is my code:
use Net::SFTP;
my $host = "cib-xcluster.biotec.usu.edu";
my %args = (
user => 'user',
password => 'pass',
debug => 0,
protocol => '1,2',
port => '22',
);
print "connecting to $host . . .\n";
my $sftp = Net::SFTP->new($host, %args);
print "Finished\n";
Any help would be really appreciated.
jonp
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.