Skip to content

Instantly share code, notes, and snippets.

@galvao
Last active November 9, 2023 18:48
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 galvao/e630b19ea374d2f6385385367e8204c1 to your computer and use it in GitHub Desktop.
Save galvao/e630b19ea374d2f6385385367e8204c1 to your computer and use it in GitHub Desktop.
Enables using a hardcoded password with ssh
#!/usr/bin/expect -f
# Requires: expect, spawn
spawn ssh-add
expect "Enter passphrase for /home/zaphod/.ssh/id_rsa:"
send "my_password"
interact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment