No announcement yet.

VERRRY slow SFTP connections & prompting for Passphrase, Keychain is already unlocked

  • Time
  • Show
Clear All
new posts

  • VERRRY slow SFTP connections & prompting for Passphrase, Keychain is already unlocked

    ā˜€ļøšŸ˜Ž Happy summer šŸ˜Žā˜€ļø

    I'm using BC on macOS 13.5.1

    Have been humming along more or less fine (waiting for BC5...) but today ran into a rather annoying problem and not sure if there's any solution.

    I have an SFTP profile to a local Synology NAS for a folder compare. The reason I'm using SSHFS instead of SMB to do this compare is that the path is not visible to SMB (it's at /volume1/docker which is not an actual Shared Folder in Synology's system).

    I've tested normal ssh connections from Terminal and they are nearly instant:
    $ time ssh nas exit
    real  0m0.185s
    user  0m0.046s
    sys   0m0.033sā€‹
    I am using public/private keys to authenticate, and the keychain is fully unlocked. Not sure what's causing the delay. The delay is about 12 seconds! Then the box prompting for my SSH passphrase appears. If I enter the correct passphrase, it does connect and work normally. But to have to enter it every time + the added 12s delay is frustrating.

    Here are the settings for the Profile (everything else is at defaults):

    Click image for larger version

Name:	screenshot_X3RV8Hyu.png
Views:	103
Size:	610.4 KB
ID:	91005ā€‹

  • #2
    1 more detail I left out of my original:
    • I'm using an ed25519 key
    • but I also tried with rsa, made no difference


    • #3

      Is performance improved if you disable Save Password in the profile? BC4 will fall through different authentication methods, so it might be trying a blank password first.

      Another test would be with another SFTP specific client. SSH and SFTP can share authentication methods, but are different connection methods, so we can sometimes see different behavior between an SSH client and an SFTP client. Something like Filezilla might help.

      Or if you can email in the connection log (even better, both logs with both BC4 and Filezilla), we can take a look at what steps it might be doing and where exactly the pause is inserting itself. When emailing to [email protected], please include a link back to this forum thread for our reference.
      Aaron P Scooter Software


      • #4
        Aaron Thanks, actually I didn't think to try unchecking "save password" but that actually does seem to make a positive difference. The SSH Passphrase prompt is still appearing, but the 12 second delay is down to 1-2s now. Is there any way to troubleshoot why BC needs to manually unlock the private key and can't use the agent/keychain?

        update: I tested the same server via SFTP using Cyberduck and it works fine, very fast and no prompt for SSH passphrase.
        Last edited by luckman212; 06-Sep-2023, 03:16 PM.


        • #5
          Ah, thanks. The prompt for the passphrase is currently intentional behavior. BC4's implementation is to-spec, and if a key has a passphrase it should require a user input. It's on our wishlist to add support for the MacOS Keychain to supply the passphrase, but in the meantime you would need to enter it manually or have a key that is re-generated without a passphrase.
          Aaron P Scooter Software


          • #6
            Ok, good to at least know that. Yes, it would be wonderful if BC would allow integrating with ssh's Keychain support in the future.