Originally Posted by pikohn
is there any way write a script that will enter a pass phrase, but somehow encrypt it so prying eyes can't figure it out?
If you encrypt the passphrase, you have to keep the encryption key somewhere, right?
As mentioned, expect(1) is an option (but it requires a password in clear text). Another option is pubkey authentication + ssh-agent(1).
After reading some of the other replies:
Yes, you could lock this away in a compiled binary and set appropriate file permissions. That should discourage the majority of (certainly not all) folks.