Last active
September 9, 2021 04:26
-
-
Save dargmuesli/33f6bdee03841122eca536924bf3bbc0 to your computer and use it in GitHub Desktop.
Add ssh keys with expect.
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 -f | |
spawn ssh-add $env(HOME)/.ssh/id_ed25519 | |
expect "Enter passphrase for $env(HOME)/.ssh/id_ed25519:" | |
send "$env(SSH_PASSPHRASE)\n" | |
expect "Identity added: /home/elements/.ssh/id_ed25519*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment