#!/usr/bin/perl use strict; use warnings; use Net::SSH2; my $host = ''; my $user = ''; my $password = ''; my $ssh2 = Net::SSH2->new(); $ssh2->debug(1); print "\nconnecting to $host...\n"; $ssh2->connect($host) or die $ssh2->error; print "\nauth to $host...\n"; $ssh2->auth_password($user,$password) or die $ssh2->error; printf "Auth OK: %s\n", $ssh2->auth_ok; print "scp get\n"; $ssh2->scp_get("test/out/Tesia220044-20081029175508-03.txt") or die $ssh2->error; $ssh2->disconnect();