I have a very simple perl script which does the following (cut out some

use Net::SFTP;
my %args = (
user => $user,
password => $password,
debug => $debugging
my $sftp = Net::SFTP->new($server, %args);

This is the output I get:
wcary3wa.ca.nortel.com: Reading configuration data /root/.ssh/config
wcary3wa.ca.nortel.com: Reading configuration data /etc/ssh_config
wcary3wa.ca.nortel.com: Allocated local port 1021.
wcary3wa.ca.nortel.com: Connecting to, port 22.
wcary3wa.ca.nortel.com: Remote version string: SSH-1.99-OpenSSH_3.4p1
wcary3wa.ca.nortel.com: Remote protocol version 1.99, remote software
version OpenSSH_3.4p1
wcary3wa.ca.nortel.com: Net::SSH::Perl Version 1.30, protocol version
wcary3wa.ca.nortel.com: No compat match: OpenSSH_3.4p1.
wcary3wa.ca.nortel.com: Connection established.
wcary3wa.ca.nortel.com: Sent key-exchange init (KEXINIT), wait
wcary3wa.ca.nortel.com: Algorithms, c->s: 3des-cbc hmac-sha1 none
wcary3wa.ca.nortel.com: Algorithms, s->c: 3des-cbc hmac-sha1 none

At this point the program just hangs....

If I just use regular FTP it works:
use Net::FTP;
$ftpobj = Net::FTP -> new ($server);
$ftpobj -> login($user,$password);
$ftpobj -> get ($downloadFile);
$ftpobj -> quit;

Also if I just run sftp from the shell directly (e.g sftp
root@xx.xx.xx.xx) it also works.

Does anyone know why the perl script is not working or what I do to
further debug this.