Last active
December 22, 2015 21:09
-
-
Save masayuki5160/6531580 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Net::OpenSSH; | |
my $host = "hostname"; | |
# ログイン認証 | |
my $ssh = Net::OpenSSH->new( | |
$host, | |
( | |
user => 'username', | |
password => 'pass', | |
port => '10022', | |
), | |
); | |
$ssh->error and die "Can't ssh to ". $host .": " . $ssh->error; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tanaka-no-MacBook-Air:Perl masayuki5160$ curl -L http://cpanmin.us | perl - --sudo App::cpanminus
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 303 0 303 0 0 805 0 --:--:-- --:--:-- --:--:-- 12120
100 262k 100 262k 0 0 245k 0 0:00:01 0:00:01 --:--:-- 245k
--> Working on App::cpanminus
Fetching http://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7001.tar.gz ... OK
Configuring App-cpanminus-1.7001 ... OK
Building and testing App-cpanminus-1.7001 ... Password:
OK
Successfully installed App-cpanminus-1.7001
1 distribution installed
tanaka-no-MacBook-Air:Perl masayuki5160$ sudo -H cpanm Net::OpenSSH
--> Working on Net::OpenSSH
Fetching http://www.cpan.org/authors/id/S/SA/SALVA/Net-OpenSSH-0.60.tar.gz ... OK
Configuring Net-OpenSSH-0.60 ... OK
Building and testing Net-OpenSSH-0.60 ... OK
Successfully installed Net-OpenSSH-0.60
1 distribution installed
tanaka-no-MacBook-Air:Perl masayuki5160$