Pelibali, On Tuesday 01 November 2005 13:37, pelibali wrote:
Hi, I have a working, but extremely user-annoying bash-script, consis- ting of 20-25 scp lines combined with few "ssh hostname 'command'" -type commands. Is there please an easier way to achieve the above scp/ssh jobs without to be asked for the password several (=many) times? I wouldn't like to change ssh's default behaviour for asking pass- word(s), even for root; but started to be very annoyed by my own idea to make such a script to "accelerate" my todos. Please help:)
To start, Ian's suggestion is definitely the way to go to solve your problem. But there are some other things you should know scp: 1) Scp has internal wild-card expansion, so you can pass shell-style glob patterns and it will expand them and send all the files matched by those patterns, prompting only once. And unlike the case of separate arguments, multiple file names generated this way won't trigger multiple password requests. 2) Scp can transfer entire directory hierarchies by giving it the "-r" option.
Thanks, Pelibali
Randall Schulz