diff options
author | Jesse Luehrs <doy@tozt.net> | 2018-10-29 03:03:29 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2018-10-29 03:03:29 -0400 |
commit | db8dd3e6140e66db46f309bff9054ba137eb797a (patch) | |
tree | 889147780271b8a9ea1283cea782d118e1b09cf1 /bin/laptop/ssh-add-helper | |
parent | 40956ae026974be3fb746eb48f141b8eb14470da (diff) | |
download | conf-db8dd3e6140e66db46f309bff9054ba137eb797a.tar.gz conf-db8dd3e6140e66db46f309bff9054ba137eb797a.zip |
move around some type-specific scripts
Diffstat (limited to 'bin/laptop/ssh-add-helper')
-rwxr-xr-x | bin/laptop/ssh-add-helper | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/laptop/ssh-add-helper b/bin/laptop/ssh-add-helper new file mode 100755 index 0000000..cae6f27 --- /dev/null +++ b/bin/laptop/ssh-add-helper @@ -0,0 +1,14 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use IO::Pty::Easy; + +my $hostname = `hostname`; +my $pass = `pass search ssh.$hostname`; +my $pty = IO::Pty::Easy->new; +$pty->spawn("ssh-add -t 1800 $ARGV[0]"); +$pty->read; +$pty->write($pass . "\n"); +while (1) { + last if $pty->read =~ 'Identity added'; +} |