Skip to content

Instantly share code, notes, and snippets.

@cesc1989
Last active June 17, 2020 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cesc1989/04f11835893de5ed49ad to your computer and use it in GitHub Desktop.
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
#!/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
@cesc1989
Copy link
Author

Lo mejor es no darle un passpharse aunque se pierda algo de seguridad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment