Skip to content

Instantly share code, notes, and snippets.

@TimorYang
Created April 15, 2021 02:55
Show Gist options
  • Save TimorYang/ac3b30c3b2eee9866fad060101246eed to your computer and use it in GitHub Desktop.
Save TimorYang/ac3b30c3b2eee9866fad060101246eed to your computer and use it in GitHub Desktop.
#!/usr/bin/expect
spawn ssh-add /Users/admin/.ssh/cbd_rsa
expect "Enter passphrase for /Users/admin/.ssh/cbd_rsa:"
send "123456\n";
expect "Identity added: /Users/admin/.ssh/cbd_rsa (yangzhidong@chebada.com)"
interact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment