Author Topic: PM6 and key-based authentication for SFTP  (Read 4660 times)

Offline mdufour

  • Newcomer
  • *
  • Posts: 6
    • View Profile
PM6 and key-based authentication for SFTP
« on: March 17, 2020, 05:31:49 AM »
Hello,

I'm trying to configure PM6 (build 4155) on my MacOS 10.15.3 to use a key instead of a password for the SFTP upload connection. I looked at the documentation and did not see anything specific regarding this.

I tried to paste the private key (PEM format) in the password field and gave PM6 complete disk access (to use my ~/.ssh config and keys), but nothing works. I cannot seem to be able to upload a file. The status says "Ready.", but I always get the error
Code: [Select]
TIMESTAMP STATUS LOCAL_PATH SERVICE_TYPE REMOTE_PATH SIZE MD5_DIGEST
2020-03-17 08:23:30 [ERROR] /Users/me/Desktop/DSC_7477.JPG SFTP Net::SFTP::StatusException open /DSC_7477.JPG (2, "no such file")

Using sftp on the command line with the same credentials works fine.

The end service to upload to is AWS Transfer for SFTP.

Can you help?

Thanks!

Offline Jerry H

  • Camera Bits Staff
  • Full Member
  • *****
  • Posts: 230
    • View Profile
    • Camera Bits, Inc.
Re: PM6 and key-based authentication for SFTP
« Reply #1 on: March 17, 2020, 11:05:16 AM »
If the SFTP file uploader status indicates that it is ready, then we should have successfully connected to the server.

That's an interesting error, I wouldn't expect a "no such file" error from an upload operation. I wonder if the SFTP site in question renames/moves the file and is causing a race condition where it appears that the file upload has failed.

Does the operation fail immediately upon clicking the Send button, or at the end of the upload progress? Have you checked the server to see if the file exists (possibly renamed)?

I will try and recreate this problem locally and investigate further.

-Jerry

Offline mdufour

  • Newcomer
  • *
  • Posts: 6
    • View Profile
Re: PM6 and key-based authentication for SFTP
« Reply #2 on: March 17, 2020, 11:25:02 AM »
I did check in the S3 bucket and the file is not present.

The error takes some time to come up, it seems to try a couple of times before throwing the error.

Offline Jerry H

  • Camera Bits Staff
  • Full Member
  • *****
  • Posts: 230
    • View Profile
    • Camera Bits, Inc.
Re: PM6 and key-based authentication for SFTP
« Reply #3 on: March 18, 2020, 09:39:23 AM »
I wasn't able to test this locally, as we don't have the AWS Transfer for SFTP enabled on our Amazon test account.

Please provide me with your Photo Mechanic log.  In Photo Mechanic go to the Help menu and choose "Reveal Support Data..." and a window will come forward with the zipped log file selected.  Use the 'Attachments and other options' link when you're composing your reply to this message and there you'll be able to upload your zipped PM log file.

Thanks,

Jerry

Offline mdufour

  • Newcomer
  • *
  • Posts: 6
    • View Profile
Re: PM6 and key-based authentication for SFTP
« Reply #4 on: March 19, 2020, 06:36:57 PM »
Sorry for the delay, I did not see your reply. Here's the log.

Offline Jerry H

  • Camera Bits Staff
  • Full Member
  • *****
  • Posts: 230
    • View Profile
    • Camera Bits, Inc.
Re: PM6 and key-based authentication for SFTP
« Reply #5 on: March 20, 2020, 10:46:13 AM »
Sorry for the delay, I did not see your reply. Here's the log.

Thank you for the log file.

I've sent you a personal message with a download URL to a build that may resolve this upload failure. Please let me know if the issue persists.

-Jerry


Offline mdufour

  • Newcomer
  • *
  • Posts: 6
    • View Profile
Re: PM6 and key-based authentication for SFTP
« Reply #6 on: March 20, 2020, 10:49:22 AM »
The link returns a 404.

Offline Jerry H

  • Camera Bits Staff
  • Full Member
  • *****
  • Posts: 230
    • View Profile
    • Camera Bits, Inc.
Re: PM6 and key-based authentication for SFTP
« Reply #7 on: March 20, 2020, 11:02:58 AM »
I made a typo. An updated link was sent.

Sorry about that.

-Jerry

Offline mdufour

  • Newcomer
  • *
  • Posts: 6
    • View Profile
Re: PM6 and key-based authentication for SFTP
« Reply #8 on: March 20, 2020, 11:20:48 AM »
Allrighty!

I tried to upload the same file as before, and it works with the new build!

Thanks!

Offline mdufour

  • Newcomer
  • *
  • Posts: 6
    • View Profile
Re: PM6 and key-based authentication for SFTP
« Reply #9 on: March 20, 2020, 11:25:06 AM »
When can we expect the fixed version to be generally available?

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24756
    • View Profile
    • Camera Bits, Inc.
Re: PM6 and key-based authentication for SFTP
« Reply #10 on: March 20, 2020, 11:37:39 AM »
When can we expect the fixed version to be generally available?

We're gathering up a few more fixes for Photo Mechanic 6 before we make a new official release.  I expect it sometime in April.

-Kirk