Last active
June 17, 2020 19:34
-
-
Save cesc1989/04f11835893de5ed49ad to your computer and use it in GitHub Desktop.
Automaticly ssh-add the github ssh file to avoid typing the passphrase in every boot
This file contains 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 /home/[USER]/.ssh/gh_rsa | |
expect "Enter passphrase for /home/[USER]/.ssh/gh_rsa:" | |
send "[PUT-PASSPHRASE HERE]\n"; | |
interact | |
## Call with command | |
## expect gh_automatic_login.sh | |
#Found in: | |
#http://unix.stackexchange.com/questions/90853/how-can-i-run-ssh-add-automatically-without-password-prompt | |
## Install expect command | |
## sudo apt-get install expect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Lo mejor es no darle un passpharse aunque se pierda algo de seguridad.