how to give password for ssh connection from shell script

Gavin McDonald gavitron at gmail.com
Wed May 3 19:19:57 UTC 2006


The solution I came up with for this problem was to use expect.

In my situation, setting up keys was not an option, so I had to
use password authentication.  

You can even use expect to create an interactive ssh session with
autologin, however I have found that certain high-ascii characters
can cause the expect session to hang before going interactive. ymmv.

-G

Regards,

Gavin McDonald
========================
EVI Logistic Enterprises
email: me at gavitron.com
phone: (604) 313-3845


> -----Original Message-----
> From: redhat-list-bounces at redhat.com [mailto:redhat-list-
> bounces at redhat.com] On Behalf Of joe at illegal-access.de
> Sent: Wednesday, May 03, 2006 4:50 AM
> To: redhat-list at redhat.com
> Subject: AW: how to give password for ssh connection from shell script
> 
> Hi Krishnaprasad,
> 
> I had the same problem some time ago... but I got NO solution... BUT the
> "authorized_keys" are just therefor... so you should use them (if possible
> ;-)
> 
> cu,
>  Joe
> 
> 
> 
> >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 ...?
> >
> >Thanks
> >Krishnaprasad
> 
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list




More information about the redhat-list mailing list