[Ssh-sftp-perl-users] Error creating SFTP object in Net::SSH2
Brought to you by:
dbrobins
From: Yonatan K. <Yon...@Ka...> - 2008-02-05 15:13:30
|
I have the following code: (edited for easy reading): ----------------- my $ssh2 = new Net::SSH2(); $ssh2->connect($servername().":".$SSH_Port); my $auth_ret_status = $ssh2->auth_password($username,$password ) ; if ($auth_ret_status) { ... OK } else } die...... } my $sftp = $ssh2->sftp(); if (!defined $sftp) { die "error creating SFTP object"; } ---------------- Occasionally the code will die when the $sftp object is not defined. If it's able to get to the point where the login is ok, why can't it create the SFTP object? It not frequent, but it would still be good to know whats going on behind the scenes... thanks |