Author Topic: Setting up SFTP with private key file  (Read 897 times)

eb1

  • Newbie
  • *
  • Posts: 2
Setting up SFTP with private key file
« on: April 18, 2017, 07:00:25 PM »
Hi everyone,

I've been trying to set up YummyFTP to connect via SFTP using a private key file rather than a username/password.
I've gotten my Windows box set up with FileZilla, and just now was able to connect via the sftp Terminal on my Mac. Here's the command line:

sftp -P 333 -i ~/.ssh/mykeyfile_rsa username@servername.com

Unfortunately, I seem to be having issues inside YummyFTP. I've set:

- Protocol: SFTP
- Server: servername.com
- User name: username
- Password: <blank>
- Port: 333
- SSH key (checked): ~/.ssh/mykeyfile_rsa

But when I attempt to connect, it sits around for a bit and then errors out with a "Permission denied (publickey,gssapi-keyex,gssapi-with-mic)."
Any idea what I need to tweak here?

JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2843
Re: Setting up SFTP with private key file
« Reply #1 on: April 18, 2017, 09:16:42 PM »
I must admit, I'm not sure..  ???

Yummy does check the ssh_config file for entries which affect the server, and those settings take precedence. Do you have something like that?

Another option is that Yummy is picking up a passphrase from the Apple Keychain for this server. Anything in there?

eb1

  • Newbie
  • *
  • Posts: 2
Re: Setting up SFTP with private key file
« Reply #2 on: April 18, 2017, 10:11:20 PM »
Thanks for the reply!

It looks like ~/.ssh/config is not there. /etc/ssh has a couple files -- ssh_config and sshd_config -- but it looks like those are completely boilerplate; ssh_config is completely commented out.

I'm not seeing any matches for the _rsa key file in my Keychain Access. I generated the file from the command line back in February.

I did notice that the default timeout value of 20 seconds wasn't cutting it for FileZilla on my Windows machine -- I upped the value to 90 seconds, and the server eventually responded. Could that be an issue? Where do I set the timeout in YummyFTP? It looks like there are a few timeout values under Preferences>Error Recovery.

JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2843
Re: Setting up SFTP with private key file
« Reply #3 on: April 19, 2017, 10:04:15 AM »
In the Error Recovery panel of the Preferences you could increase the top slider to 90 or more, but I'm not sure that's the problem as you're getting a response that the authentication failed. How long did it take to connect via command line?

Alster79

  • Newbie
  • *
  • Posts: 1
Re: Setting up SFTP with private key file
« Reply #4 on: April 26, 2017, 03:44:04 AM »
Good that you solved the issue. If you have the time could you take the time to answer the question that JD posted. Thinking about setting up an ftp with key as well so abit curious if its seemless to connect via the command line. All the Best // Alster