02-18-2005 02:27 AM
I want to script the transfer of files with FTP, but I don't want to assign my password to a value, like user_passwd="password",
I was thinking instead of reading the password like this, read user_passwd, but I would like that when I'm at the prompt the keys that I enter to be not showed at the screen, just like when you issue the passwd commant!! See what I mean!?
Is this possible???
Solved! Go to Solution.
02-18-2005 02:35 AM
The idea is:
echo "Enter Login: \c"
echo "\nEnter Password: \c"
By the way, you can also create a .netrc file so that you don't have to prompt for the passwd. The file should only be able to be read by that user.
02-18-2005 02:36 AM
trap 'stty echo; exit' 0 1 2 3 15
echo "Enter Password: \c"
Also you may want to have a look at expect tool for this. You can also make use of .netrc file.
Or a better way is to use ssh for this.