Results 1 to 3 of 3
Hi folks,
i would like to write a script for secure copy. Please help me in writing. Once script executes the scp command then, command prompt prompts for password. I ...
- 03-28-2007 #1Just Joined!
- Join Date
- Dec 2006
- Posts
- 5
shell script for scp
Hi folks,
i would like to write a script for secure copy. Please help me in writing. Once script executes the scp command then, command prompt prompts for password. I wud like to automate this with a script. How to provide the password to the prompt using the script?
--Ganesh.
- 03-28-2007 #2
There is no way to set the password in the script. The only way to get the script to automatically scp would be to use Authorised keys that allows the client to ssh into the server without specifying a password.
As for how to do it, bash is the best way, all bash scripts start off with:
as the first line. Then it's a simple case of putting in the commands in the order that you want to do to get a simple script.Code:#!/bin/bash
"I am not an alcoholic, alcoholics go to meetings"
Registered Linux user = #372327
- 03-28-2007 #3Just Joined!
- Join Date
- Dec 2006
- Posts
- 5
Thank U sdousley.
--Ganesh.


Reply With Quote