Re: AW: how to give password for ssh connection from shell script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Try this: (save it on a file and exec it)

cat > myssh.sh <<EOF
#1 Here you put clear text password. Beware!
echo '!#/bin/bash'   > /tmp/pswd.sh
echo "echo XXXXX" > /tmp/pswd.sh
chmod +x /tmp/pswd.sh

#2) export your varibles
export DISPLAY=:0
export SSH_ASKPASS=/tmp/pswd.sh

#3) Finally...
setsid ssh user@host
EOF

Then:
 . myssh.sh

Alex



On Wed, 2006-05-03 at 13:50 +0200, joe@xxxxxxxxxxxxxxxxx wrote:
> 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
> 
-- 
Alessandro Simula <alessandro.simula@xxxxxxxxxxx>

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux