shell stdin redirection: possible for ssh-password input?

Rob spamrefuse at yahoo.com
Thu Mar 24 19:40:19 PST 2005


Hi,

I must connect to another computer with ssh, but
this computer does not allow password-less
connections (i.e. the administrator has disabled
the use of id_dsa.pub, authorized_key etc.)

I'm trying to write a script to do the ssh connection
automatically, but the script always prompts for
the password. Can I construct an input redirect, so
that I can feed the password via my script?
I tried following:

#!/bin/sh
ssh myISP <<EOF
myPassWord
EOF

but that doesn't work.

I take for granted that my password will be there
in clear text! Are there other options?

Thanks,
Rob.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the freebsd-questions mailing list