Hello.
Use expect. Some quick example:
set username "user"
set password "somepass"
########
spawn ssh 111.222.222.111 -l $username
expect "assword:"
send "$password\r"
expect "#"
send "whatever command to execute"
expect "#"
send "exit\r"
Regards,
naslov
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 ...?
Thanks
Krishnaprasad
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list