Have Script Deal with SSH/SCP password Prompt

cevans81_at_gmail.com
Date: 08/16/05

  • Next message: Darren Dunham: "Re: Have Script Deal with SSH/SCP password Prompt"
    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


  • Next message: Darren Dunham: "Re: Have Script Deal with SSH/SCP password Prompt"

    Relevant Pages

    • Re: Deny rules...
      ... services client I have not implemented it. ... Tony Su ... >The Script makes sure the ip to be blocked is not itīs ... >I have few outside servers to connect from to my servers ...
      (microsoft.public.isa)
    • Re: Deny rules...
      ... services client I have not implemented it. ... If you are writing code to populate a Client set, ... >The Script makes sure the ip to be blocked is not itīs ... >I have few outside servers to connect from to my servers ...
      (microsoft.public.isa)
    • Re: Windows->Linux. Graphical terminal emulator.
      ... The client doesn't ... >> have the servers public key until it contacts the server, ... So it's vulnerable to a man in the middle attack. ...
      (alt.linux)
    • Re: Windows->Linux. Graphical terminal emulator.
      ... The client doesn't ... >> have the servers public key until it contacts the server, ... So it's vulnerable to a man in the middle attack. ...
      (alt.os.linux)
    • Re: Unable to install the standard client using login scripts
      ... What are you using in the logon script to do installs? ... configured your client push installation account and also any client ... > I have SMS 2003 in AD on Windows 2003 Servers. ... > client installation based on group memberships in the login scripts. ...
      (microsoft.public.sms.setup)