Have Script Deal with SSH/SCP password Prompt
cevans81_at_gmail.com
Date: 08/16/05
- Previous message: Darren Dunham: "Re: Passwordless ssh, problems with passphrase on the server side."
- Next in thread: Darren Dunham: "Re: Have Script Deal with SSH/SCP password Prompt"
- Reply: Darren Dunham: "Re: Have Script Deal with SSH/SCP password Prompt"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 16 Aug 2005 11:47:41 -0700
Here is my problem:
I have my one client with the private key and numerous servers with the
public key. Key authentication works fine.
I have a Korn Shell Script that SCPs a file from the client to each of
the servers' home directory in the middle of the night. Here is the
line that does the copy:
scp -i PrivateKeyFile /home/chad/file.txt username@server:~/
This works absolutely fine.
Now I am adding new servers every day. What if I forget to copy the
public key to one of the servers? or something else with the connection
goes wrong? Answer: SCP will prompt for a password and my script will
hang in the middle of the night.
I would much rather prefer my script to write to an error log, then
continue with its business.
Any ideas on how I can get my script to deal with the password prompt?
Thanks a lot! ~ Chad
- Previous message: Darren Dunham: "Re: Passwordless ssh, problems with passphrase on the server side."
- Next in thread: Darren Dunham: "Re: Have Script Deal with SSH/SCP password Prompt"
- Reply: Darren Dunham: "Re: Have Script Deal with SSH/SCP password Prompt"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|