Script to Save to SFTP Server

165 views
Skip to first unread message

Kyle Katarn

unread,
Sep 7, 2011, 6:57:45 PM9/7/11
to BBEdit Talk
I am trying to come up with a script to save my local file to a remote
server without having to type the password in each time. I tried doing
this by having the script open the file in Interarchy, but for some
reason this does not work:

tell application "BBEdit"
save front document
set thefile to file of front document
end tell

tell application "Interarchy"
open thefile
end tell

Has anyone come up with a script that would quickly save something to
a remote server (either completely within BBEdit or not)?

Thanks

Kerri Hicks

unread,
Sep 7, 2011, 8:29:33 PM9/7/11
to BBEdit Talk


On Sep 7, 6:57 pm, Kyle Katarn <der...@gmail.com> wrote:
> I am trying to come up with a script to save my local file to a remote
> server without having to type the password in each time.

Does File -> Save to FTP/SFTP Server do what you want? If the password
is stored in the System Keychain, you shouldn't have to continually
type it in.

--Kerri

Kyle Katarn

unread,
Sep 7, 2011, 8:35:35 PM9/7/11
to BBEdit Talk
Unfortunately, Save to FTP/SFTP Server keeps asking me for my password
every time I select it. I cannot find a way around this, and I even
did Keychain First Aid in Keychain Access. I was hoping to find a
quick way to upload to the SFTP server without having to type in a
password every time.

Rod Buchanan

unread,
Sep 8, 2011, 10:00:58 AM9/8/11
to bbe...@googlegroups.com
On Sep 7, 2011, at 7:35 PM, Kyle Katarn wrote:

> Unfortunately, Save to FTP/SFTP Server keeps asking me for my password
> every time I select it. I cannot find a way around this, and I even
> did Keychain First Aid in Keychain Access. I was hoping to find a
> quick way to upload to the SFTP server without having to type in a
> password every time.
>
> On Sep 7, 5:29 pm, Kerri Hicks <kerri.hi...@gmail.com> wrote:
>> On Sep 7, 6:57 pm, Kyle Katarn <der...@gmail.com> wrote:
>>
>>> I am trying to come up with a script to save my local file to a remote
>>> server without having to type the password in each time.

I do this all day/every day. Create a bookmark for the server (BBEdit -> Setup -> Bookmarks), specifying your username/password and you should be good to go.

--
Rod

Ken Lanxner

unread,
Sep 8, 2011, 2:55:22 PM9/8/11
to bbe...@googlegroups.com
rodb...@gmail.com (Rod Buchanan) wrote on 9/8/11 7:00 AM

>> I am trying to come up with a script to save my local file to a
>> remote server without having to type the password in each time.
>
>I do this all day/every day. Create a bookmark for the server (BBEdit
>-> Setup -> Bookmarks), specifying your username/password and you
>should be good to go.

I see the same thing as Kyle, the original poster. Could the
difference be how different servers authenticate?

If I save a particular document to a server, it asks for the
password first time but not for future saves of that same
document during that session. But as soon as I try to save
another document to the same server, I need to re-enter my password.

This happens with bookmarked servers.

However, this is not a problem for me because I use Transmit for
my FTP client and with an applescript provided by some kind soul
here, a key command will upload my current document to the server.

Also, I have found that opening a new FTP browser to the server
and leaving it open takes care of the problem and I can save to
that server without having to enter a password.

Ken

--
Simple Lives Web Design
http://simplelives.com

Rod Buchanan

unread,
Sep 8, 2011, 4:11:12 PM9/8/11
to bbe...@googlegroups.com
On Sep 8, 2011, at 1:55 PM, Ken Lanxner wrote:

> rodb...@gmail.com (Rod Buchanan) wrote on 9/8/11 7:00 AM
>
>>> I am trying to come up with a script to save my local file to a
>>> remote server without having to type the password in each time.
>>
>> I do this all day/every day. Create a bookmark for the server (BBEdit
>> -> Setup -> Bookmarks), specifying your username/password and you
>> should be good to go.
>
> I see the same thing as Kyle, the original poster. Could the difference be how different servers authenticate?

Maybe. I deal exclusively with Linux and AIX servers and the above works for me. Also works to my Mac Mini web server (vis SFTP). On any given day I'll save files to any of 50+ servers. If I had to enter a password each time I saved a file I'd go nuts. :)

> Also, I have found that opening a new FTP browser to the server and leaving it open takes care of the problem and I can save to that server without having to enter a password.

I use FTP browsers occasionally, but mostly I'm using "File -> Save (a Copy) to FTP/SFTP Server…"

--
Rod Buchanan

Ken Lanxner

unread,
Sep 8, 2011, 4:34:39 PM9/8/11
to bbe...@googlegroups.com
rodb...@gmail.com (Rod Buchanan) wrote on 9/8/11 1:11 PM

>leaving it open takes care of the problem and I can save to that
>server without having to enter a password.
>
>I use FTP browsers occasionally, but mostly I'm using "File -> Save (a
>Copy) to FTP/SFTP Server…"

Yeah, the FTP browser is just to keep the connection open so the
password isn't required each time.

I also upload to UNIX servers mostly.

Philippe Martin

unread,
Sep 8, 2011, 5:09:26 PM9/8/11
to bbe...@googlegroups.com
I use to put in projects the files I have on FTP servers, and I'm never prompted for a password, whether I reopen or save them.

I start by saving the files to FTP for the first time from BBEdit, then I close their local versions, open the FTP versions via BBEdit's FTP browser, then drop their proxy icons into a local project, and that's it. From then on, all I have to do to open one of these files is to open the project and select the file in the sidebar. And I just have to press cmd-S to save my changes directly on the FTP.

These are UNIX servers too, BTW.

Philippe

> --
> You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups.
> To post to this group, send email to bbe...@googlegroups.com
> To unsubscribe from this group, send email to
> bbedit+un...@googlegroups.com
> For more options, visit this group at
> <http://groups.google.com/group/bbedit?hl=en>
> If you have a feature request or would like to report a problem, please email "sup...@barebones.com" rather than posting to the group.
> Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

______________________________________________________________________
Philippe MARTIN
http://flip.macrobyte.net


Rod Buchanan

unread,
Sep 8, 2011, 5:21:41 PM9/8/11
to bbe...@googlegroups.com
On Sep 8, 2011, at 3:34 PM, Ken Lanxner wrote:

> rodb...@gmail.com (Rod Buchanan) wrote on 9/8/11 1:11 PM
>
>> leaving it open takes care of the problem and I can save to that
>> server without having to enter a password.
>>
>> I use FTP browsers occasionally, but mostly I'm using "File -> Save (a
>> Copy) to FTP/SFTP Server…"
>
> Yeah, the FTP browser is just to keep the connection open so the password isn't required each time.

I should make it clear that I do need to login to the servers, I just don't need to enter passwords.

--
Rod Buchanan

Reply all
Reply to author
Forward
0 new messages