#!/usr/bin/perl use strict; use Net::SCP::Expect; my $user = 'user1'; my $host = 'host1'; my $pass = 'pass1'; my $src_file = "/home/Script_Name.txt"; my $dst_path = "/home/"; my $s = Net::SCP::Expect->new; $s->login($user, $pass); $s->scp("$host:$src_path",$dst_path);