Created
August 27, 2017 22:09
-
-
Save mkouhei/96d421784496de748238737023dee6c4 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
#!/bin/bash -e | |
read -p 'Enter passphrase:' -s pass | |
for i in id_rsa | |
do | |
expect << EOF | |
spawn ssh-add $HOME/.ssh/${i} | |
expect "Enter passphrase for $HOME/.ssh/${i}:" | |
send "$pass\r" | |
expect eof | |
EOF | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment