Skip to content

Commit

Permalink
allow port and password in scp examples
Browse files Browse the repository at this point in the history
  • Loading branch information
timo committed Mar 27, 2017
1 parent 2e1eefe commit 1ea1ec0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/scp-download.p6
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use SSH::LibSSH;

sub MAIN($host, $user, $remote, $local) {
my $session = await SSH::LibSSH.connect(:$host, :$user);
sub MAIN($host, $user, $remote, $local, Int :$port, Str :$password) {
my $session = await SSH::LibSSH.connect(:$host, :$user, :$port, :$password);
await $session.scp-download($remote, $local);
$session.close;
}
4 changes: 2 additions & 2 deletions examples/scp-upload.p6
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use SSH::LibSSH;

sub MAIN($host, $user, $local, $remote) {
my $session = await SSH::LibSSH.connect(:$host, :$user);
sub MAIN($host, $user, $local, $remote, Int :$port, Str :$password) {
my $session = await SSH::LibSSH.connect(:$host, :$user, :$port, :$password);
await $session.scp-upload($local, $remote);
$session.close;
}

0 comments on commit 1ea1ec0

Please sign in to comment.