What do you mean when you say via "shell script". What's
the process you need to mimic, what is the expected outcome?
Code:
#!/bin/bash
scp /path/to/file1 server2:/path/to/file1
Just make passwordless ssh authentication possible for the
user account that runs this ...
Cheers,
Tink