NET::SFTP - how to close connection

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hi all,

I have a doubt with NET::SFTP module and unfortunately I am not very
skilled with Perl.
I cannot find any method to close SFTP connection since $ftp->quit
works only with FTP.I have to run many SFTP scripts and I cannot let
all my connections hang up.

This is an example of my code (protocol2, DSA key authentication):
use Net::SFTP;
my %args = (user => "$REMOTE_USER",password => "not used", debug => 1,
ssh_args => [protocol => 2, debug => 1, port => 22, interactive =>0,
identity_files => ['/home/$MY_USER/.ssh/id_dsa']] );
my $Session = Net::SFTP->new("$REMOTE_HOST", %args);

Any suggestion will be appreciated!

Thank you in advance,


Site Timeline