how to give password for ssh connection from shell script

Mike Burger mburger at bubbanfriends.org
Wed May 3 11:24:02 UTC 2006


On Wed, May 3, 2006 6:52 am, Krishnaprasad wrote:
> Hi all
>
>           how can i give password for a ssh connection from shell
> script. I dont want to disable the ssh password through "ssh-keygen"
> and "authorized_keys" . i tried by echoing password from terminal as
> well as from script. But still it is prompting for the password.
>
> Is it possbile ...?

You might be able to use an expect script.

However, you might just be better off creating a key.  You don't have to
disable the password, in order to do that, it's just that if a valid key
is passed, the connection won't ask for a password.
-- 
Mike Burger
http://www.bubbanfriends.org

Visit the Dog Pound II BBS
telnet://dogpound2.citadel.org or http://dogpound2.citadel.org:2000

To be notified of updates to the web site, visit
http://www.bubbanfriends.org/mailman/listinfo/site-update, or send a
message to:

site-update-request at bubbanfriends.org

with a message of:

subscribe




More information about the redhat-list mailing list