手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆

How to Mounting FTP/SFTP volumes with the Finder

首页 > 苹果相关 >

mac的finder不支持sftp连接服务器的.ftp是支持的.所以....问题一堆啊.

这不,网上有很多教程,有基于GUI的,有基于命令行的.

基于GUI的有两个教程,一个纯文字,一个有图版

我贴个纯文字的,然后有图版的请自己看,因为...转载图片很累啊

文字版来自  http://www.thxbye.de/mac/mac-mounting-ftpsftp-volumes-with-the-finder.html

have a server that only has FTP/SFTP/TLS support for accessing the files on it, which, in general, should be mostly sufficient. Now I’m using Mac OS X and Transmit/Yummy FTP for most of my tasks.

Since I’m a person who loves to have everything integrated into the standard GUI as good as possible I’ve been trying to find a solution for mounting directories/shares of that server straight into the finder, like you do with the iDisk or any other NFS/SMB/AFP share.

Unfortunately, the Finder itself only has read only FTP support (now I also know that FTP wasn’t made as a protocol for doing these kinds of things in the first place), which doesn’t get me too far actually, since every time I would want to upload/change a file I would need to start Transmit (or any other FTP client) and use the clunky non-embedded interface to manage the files, which is, for me at least, nowhere near satisfactory.

Sadly, after endless amounts of investigation and searching on google, I didn’t find a solution that works apart from “Use Transmit, it’s as close as you will get!”. I have tried everything that came onto my mind so far, even some very weird, exotic and just plain scary SSH tunnel workarounds, luck seems to avoid me though.

I found Google’s MacFUSE do to the job prettily, using a SSH filesystem (almost) works like a charm.

Download it and install, preferably compile it from the source, which is described in the Google Code HOWTO: code.google.com/p/macfuse/wiki/HOWTO

With the help of this you can basically mount SSH accounts as virtual volumes - and with the right parameters it even works in the Finder:

sshfs USERNAME@HOST:/DIR /MOUNTPOINT -oping_diskarb,volname=NAMEOFMOUNT ;

“USERNAME” being your SSH username;
“HOST” the SSH host;
“DIR” being the directory you want to mount;
“MOUNTPOINT” - you will need a mountpoint on your local filesystem, this should preferably be an empty directory. I just created empty directories in my home folder for that purpose (e.g. ~/mounts/orange);
“NAMEOFMOUNT” is the name of the volume as it will appear in the finger.

After entering this you should be prompted for the password of the SSH account, now, magically, you should have the volume appear in the Finder. Wee!

Now, the one and only real thing to make sure however is: Be aware that the Finder doesn’t like unstable connections - it will hopelessly beachball once the connection is interrupted unexpectedly for whatever reason.

有图版的来自 http://docs.ocf.berkeley.edu/wiki/SFTP_mount_in_Mac_OS_X

当然,这里还有一篇是命令行下怎么处理的,不过还得下载一个软件....

请看:http://www.danbishop.org/2011/09/10/how-to-mount-sftp-ssh-shares-in-os-x-lion/

他也介绍了macfusion,所以我贴了那段用命令行的:

 

If you’d like to use an sftp share directly though finder then this guide is for you.

First, you need to install OSXFuse from https://github.com/osxfuse/osxfuse/downloads

If you’re using OS X 10.8 (or above…) use the default install options and skip down to the Mountain Lion section now.

At the “Installation Type” stage, be sure to select MacFUSE Compatibility Layer. It’s unticked by default.

Once installed, you need to get Macfusion from http://macfusionapp.org/

Perform the usual drag and drop into your Applications folder then run Macfusion.

Add a new Macfusion share by clicking on the plus icon and selecting SSHFS, enter your details, click ok, then mount. After a few moments your share will be available. You can press cmd+r to show your share in the Finder.

You can now directly edit files on the sftp share using any app on your mac without the need to manually download and re-upload them.

If this process does not work for you, try restarting your mac, then re-adding the Macfusion share.

OS X Mountain Lion

Unfortunately Macfusion doesn’t work well with Mountain Lion (OS X 10.8). You can, however, still mount directories using the command line (Terminal).

First we need to download, then install sshfs: https://github.com/downloads/osxfuse/sshfs/SSHFS-2.4.1.pkg

Run through the installer with the default options.

Now create an empty directory to mount your sftp share in, for example:

dan@dans-imac:$ mkdir /Users/dan/sshfs

Then run the following:

dan@dans-imac:$ sshfs username@serveraddress:/path/to/remote/folder /Users/dan/sshfs

Navigate to /users/dan/sshfs in Finder and you’ll have access to your sftp share.

----EOF---

自此,方便了很多..smb有时候不太稳定,我感觉...好纠结




本站采用创作共享版权协议, 要求署名、非商业和保持一致. 本站欢迎任何非商业应用的转载, 但须注明出自"易栈网-膘叔", 保留原始链接, 此外还必须标注原文标题和链接.

« 上一篇 | 下一篇 »

1条记录访客评论

Very good blog article.Really thank you! Great.

Post by Detection on 2014, May 5, 8:16 PM 引用此文发表评论 #1


发表评论

评论内容 (必填):