Re: Need help with SCP and do Shell script
Re: Need help with SCP and do Shell script
- Subject: Re: Need help with SCP and do Shell script
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 25 Jan 2008 16:25:49 -0500
It's easy to tell ssh not to prompt before adding the host to
known_hosts. Just put the line
StrictHostKeyChecking no
into the file "config" in the folder ".ssh" under your home directory.
Or, alternatively, add the option
-o StrictHostKeyChecking=no
to the command line that you're running.
But passing in a password is a much harder prospect. ssh doesn't read
the password from standard input, but forces a read from the terminal,
so there's no way to pipe it in from another command or a file. You
would need something like the Expect system, but that's not a very
easy thing to set up or use.
What is preventing you from installing an ssh key on these hosts so
that you can copy without a password prompt?
Not related to the particular issues you raised, but I would recommend
using rsync rather than scp. It's a friendly way to copy many files,
as it will only send the bare minimum data over the network. Useful
to update a copy by only sending the bits that have changed since the
last time, for instance. You still need to authenticate to each
host, though.
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden