From: Chris cc (lazyboy_2k@yahoo.com)
Date: Wed Sep 26 2007 - 17:15:06 EDT
Hi,
Is there a way to pass my $PASSWD var to the prompt so that there is
no interactive mode? I know that I can set up ssh-keygen for password less login but i can't do it for reasons. So, I'll encrypt this script so no one can view it. Any helps/suggestions are welcomed & appreciated. Btw, I don't know expect script so can't do it :(
#!/bin/ksh
# set Variables
USER='test'
PASSWD='test1'
HOST='testserv1'
ssh $HOST -l $USER <<EOF
$PASSWD
ls -a /tmp
exit
EOF
Output:
# ./loginScript
Pseudo-terminal will not be allocated because stdin is not a terminal.
Password:
.......
Thanks,
-Chris
---------------------------------
Moody friends. Drama queens. Your life? Nope! - their life, your story.
Play Sims Stories at Yahoo! Games.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:42:21 EDT