Using a variable's value as password for scp, ssh etc. instead of prompting for user input every time
AFAIK, the bash shell commands `ssh` or `scp` do not have a password parameter. Otherwise I could keep the password in a variable and probably get rid of the enter password prompt. If I write an scp command in my shell script, it prompts the user to input the password. I have multiple ssh and scp commands in my script and I do not want the user to enter the password every time. I would prefer to save the password in a shell variable in the beginning (by asking password once), then use it for every ssh or scp. 

I read about "public key identification" in [this question][1]. Is it related to the solution I am looking for?


  [1]: http://stackoverflow.com/questions/3457719/complete-password-field-scp-command-on-linux
Using a variable's value as password for scp, ssh etc. instead of prompting for user input every time
===

AFAIK, the bash shell commands `ssh` or `scp` do not have a password parameter. Otherwise I could keep the password in a variable and probably get rid of the enter password prompt. If I write an scp command in my shell script, it prompts the user to input the password. I have multiple ssh and scp commands in my script and I do not want the user to enter the password every time. I would prefer to save the password in a shell variable in the beginning (by asking password once), then use it for every ssh or scp. 

I read about "public key identification" in [this question][1]. Is it related to the solution I am looking for?


  [1]: http://stackoverflow.com/questions/3457719/complete-password-field-scp-command-on-linux