Your best friend for file transfer
Fetch
SFTP with public key - how? (13 posts)
- Started 2 years ago by Franz
- Latest reply 2 years ago from Richard
-
Franz Member
-
Scott McGuire Administrator
Hi,
You want to create a file named "config" in the ".ssh" folder of your home folder (if this file already exists you should just append lines to it). The file should contain lines like the following:
host your-hostname
IdentityFile path-to-the-keyfilefor example:
host ftp.example.com
IdentityFile ~/.ssh/key-for-example.pemPlease let us know if this is not clear, or if you run into any problems.
Thanks,
Scott McGuire
Fetch Softworks -
Franz Member
Hi Scott,
Thank You, it works.
Franz
-
Scott McGuire Administrator
Hi Franz,
You're welcome, and we're glad to hear you got it working.
Best,
Scott McGuire
Fetch Softworks -
Jason Member
I'm encouraged that this can work, but don't get the instructions...
By "home" folder what do you mean? I'm not aware of a Fetch home folder but did place my PEM in my user folder. How would fetch be aware of a file here unless explicitly set in the settings or connection? But I cannot find where to set the PEM path in Fetch...
I followed the instructions here:
http://fetchsoftworks.com/fetch/help/Contents/Tutorial/UsingSSHAgent.html
and after submitting the dummy password, Fetch errors: "Connection could not be established" I am able to SSH from the command line with my PEM...Thanks.
-
Scott McGuire Administrator
Hi,
By "home" folder we meant what I think you are calling your "user" folder. That is, the folder you get to when you go to the Finder's Go menu and choose "Home."
However, you cannot see the .ssh folder in your home folder with the Finder. You need to use the command line. You would do something like:
* Open Terminal
* Type "cd ~/.ssh" (without quotes) to change to the .ssh folder.
* Either create a file named "config" in that directory, or if one already exists, open it.
* Add two lines to the config file as described above. If your PEM file is in your home folder, you would type something like:host your-hostname-goes-here
IdentityFile ~/name-of-your-pem-file.pemThis tells SSH how to find your PEM file automatically, and then Fetch, which uses Mac OS X's SSH to open the SFTP connections, will be able to find and use it too.
I hope this helps clarify things.
Thanks,
Scott McGuire
Fetch Softworks -
ispiderman Member
thumbs up, way up for the instruction posted on this page. It works!!! I searched and searched all over the web, but could not find any way to set Fetch or any other mac sftp client to accept .pem file my client sent me to log into their server. THANK YOU!!! How come Fetch UI or other client does not allow for this is rather frustrating. But THANK-YOU again.
-
Scott McGuire Administrator
Hi ispiderman,
You're welcome and we're glad you found this information helpful.
We don't have a UI way to do this because honestly, until a couple of months ago, no one had asked us how to accomplish this with Fetch; and it still remains pretty uncommon. But we will keep an eye on the requests and feedback and if it seems like using .pem files become much more common, we will consider adding UI for it. But one thing we will do is update the help to include these instructions on how to set it up.
Best,
Scott McGuire
Fetch Softworks -
Richard Member
Hello I know this is quite an old thread but I'm looking for a mac FTP client that would allow me to connect to multiple SFTP accounts on one server using public key authentification.
For this I need to be able to specify the public_key on a per account basis and not on a per server basis.
I don't understand why Cyberduck is the only client that allows to specify a public key per account ..., surely it's just a matter of adding a -i public.key to the initial command line, is there not a way to do this with fetch ? If there is then I will buy fetch straight away !
-
Scott McGuire Administrator
Hi Richard,
My understanding is the way you're doing this in Cyberduck is to select the public key file you want to use for each account in the connection dialog or bookmark, is that correct?
Thanks,
Scott McGuire
Fetch Softworks -
Richard Member
Yes that is how I do it. But I would also be happy with a field to manually set the public_key path to the file on my mac or maybe just set the file name in the .ssh folder ...
Thankyou.
-
Ben Artin Administrator
While there is no way to specify a per-connection SSH identity file inside Fetch, you can use a feature of SSH to accomplish this without any help from Fetch.
Let's say you want to connect to account "acct1" on host "myhost" using identity file "id1", and to account "acct2" on the same host using identity file "id2".
If you add the following to your
~/.ssh/configfile:Host acct1-myhost
HostName myhost
User acct1
IdentityFile id1Host acct2-myhost
HostName myhost
User acct2
IdentityFile id2then you can type
ssh acct1-myhostorssh acct2-myhostto connect to each account using its corresponding identity file.Similarly, after you've added those lines to your
~/.ssh/config, you can use "acct1-myhost" or "acct2-myhost" as hostname in Fetch's New Connection dialog and Fetch will use the appropriate identity file.Hope this helps,
Ben
-
Richard Member
Thankyou I will give it a try !
- Page 1
Hello,
how can I make a SFTP-connection with a public-key-authentification? (with SSH it is the option: -i xxxxkey).
I have tried the way as it was described in the online-manual,(»Using SSH public/private keys or ssh-agent with Fetch«) but it will not work with Fetch, but with SSH (option: -i xxxxkey) and another FTP-App (where I can choose my key).
How can I with Fetch select the private key which I need?
Franz
Posted 2 years ago #