Script doing tons of scp jobs.
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:) Thanks, Pelibali
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
use ssh-keygen to generate public key. Install this key to ther "other" machine. No more typeing... -Stathis On Wednesday 02 November 2005 06:13, Randall R Schulz wrote:
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
Rouvas / Stathis, On Wednesday 02 November 2005 00:04, rouvas wrote:
use ssh-keygen to generate public key. Install this key to ther "other" machine. No more typeing...
Not only was that suggestion already made (by Ian Marlier), I, in the message to which you're replying, explicitly concurred with that suggestion.
-Stathis
Randall Schulz
On Wednesday 02 November 2005 16:58, Randall R Schulz wrote:
Rouvas / Stathis,
Stathis is fine...
On Wednesday 02 November 2005 00:04, rouvas wrote:
use ssh-keygen to generate public key. Install this key to ther "other" machine. No more typeing...
Not only was that suggestion already made (by Ian Marlier), I, in the message to which you're replying, explicitly concurred with that suggestion.
well, great minds converge :-)
-Stathis
Randall Schulz
participants (3)
-
pelibali
-
Randall R Schulz
-
rouvas