CPAN::Forum
Net-SFTP-Foreign - Re: 64-bit code won't compile and can't connect to sftp server
| Posted on Wed Jul 4 02:43:06 2007 by jmarshll in response to 5606 (See the whole thread of 16) |
| Re: 64-bit code won't compile and can't connect to sftp server |
|
Hi again. After stripping out some other code that my prog uses that did something to alter the err
+or msg, I still get an error, but the msg is a little different from what I originally told you. F
+or the server I'm testing, I can connect using the keys just fine from the command line, like...
sftp -o IdentityFile=/home/myuser/.ssh/my_priv_key_file myuserid@sftp.myhost.com
This is the script that's failing, along with the other info you asked for...
use Net::SFTP::Foreign;
my $host = 'sftp.myhost.com';
my $user = 'myuserid';
my $port = '22'; # the server is actually listening on port 22
my $sftp = Net::SFTP::Foreign->new(
host => $host,
user => $user,
port => $port,
more => [qw(-v -i /home/myuser/.ssh/my_priv_key_file)]
);
$sftp->error and die "SSH connection failed: " . $sftp->error;
The cmd to execute is...
perl -T SFTPTest.pl
The error msg I get is...
SSH connection failed: Connection to remote server is broken at SFTPTest.pl line 15
Sorry I can't be more helpful. Thanks for your assistance...
|
| Write a response |
(0)
]