Skip to content

Instantly share code, notes, and snippets.

@hub-cap
Created May 31, 2013 17:38
Show Gist options
  • Select an option

  • Save hub-cap/5686589 to your computer and use it in GitHub Desktop.

Select an option

Save hub-cap/5686589 to your computer and use it in GitHub Desktop.
expect -c "
spawn sudo -Hiu baz /usr/bin/ssh-keygen -f ~baz/id_rsa -q
expect \"empty for no passphrase\"
send \n
expect assphrase
send \n
expect eof"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment