File: password_from_data.pl

package info (click to toggle)
libnet-openssh-perl 0.84-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 448 kB
  • sloc: perl: 3,410; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 294 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl

use strict;
use warnings;

use Net::OpenSSH;

@ARGV >= 2 or die "Usage:\n  $0 host cmd [arg1 [arg2 [...]]]\n\n";

my ($host, @cmd) = @ARGV;

my $ssh = Net::OpenSSH->new($host);

$ssh->system({stdin_fh => \*DATA}, sudo => -kSp => '', '--', @cmd);

__DATA__
my-remote-password