Re: applescript shell script SCP?
Re: applescript shell script SCP?
- Subject: Re: applescript shell script SCP?
- From: "Mark J. Reed" <email@hidden>
- Date: Mon, 8 Dec 2008 23:01:50 -0500
Dan: I must apologize for the tone of my original reply. My only defense is that it's been a long and busy day, but that's no excuse for rudeness.
Allow me to sum up, in a hopefully friendlier tone:
1. You can set up ssh (and therefore, scp and sftp) to allow access without a password, by creating a public/private keypair, adding the public half to the "authorized_keys" file on the remote system, and enabling the private half in ssh-agent on the local system. There are step-by-step instructions in various places on the web; this one:
is specifically for Linux, but the details don't differ significantly on OS X apart from modifying the sshd (server) config, which should not usually be necessary.
2. You can use an AppleScriptable application that speaks SFTP. I mentioned Fetch; Stan added Interarchy and Cyberduck. This might be the cleanest and simplest solution.
3. You can use expect(1) - or Terminal.app Applescripting, for that matter - to script a terminal interaction with the scp or sftp command, but much like GUI scripting, this is fragile and not recommended.
4. You can use another command-line utility that allows automation of SFTP interaction. Besides Stan's Ruby solution (possibly as amended by me), you could use Perl or Python - or simply an SFTP-enabled version of curl, such as either the Fink or MacPorts version.
I think that's about all the possibilities...
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