Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Mar 2005 19:40:15 -0800 (PST)
From:      Rob <spamrefuse@yahoo.com>
To:        FreeBSD questions <freebsd-questions@freebsd.org>
Subject:   shell stdin redirection: possible for ssh-password input?
Message-ID:  <20050325034016.1961.qmail@web54009.mail.yahoo.com>

next in thread | raw e-mail | index | archive | help

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 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050325034016.1961.qmail>