Created
March 29, 2018 20:36
-
-
Save pipizhang/a0ea65e89330469a8bbdea660bf73db8 to your computer and use it in GitHub Desktop.
Automated ssh-add without enter passphrase
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
| #!/usr/bin/expect | |
| #author PeterZhang | |
| set pass "YOUR_PASSPHRASE" | |
| spawn ssh-add $HOME/.ssh/id_rsa | |
| expect "*passphrase*" {send "$pass\r"} | |
| interact |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment