No announcement yet.

can't connect to aws ec2 w/sftp private key

  • Filter
  • Time
  • Show
Clear All
new posts

  • can't connect to aws ec2 w/sftp private key

    I'm having trouble connecting to AWS EC2 instance using BC. As far as I can tell settings are correct and match what I have for CyberDuck, which connects successfully.

    This is what I see in log window:

    8/6/19 10:55:02 AM Connecting to aws
    8/6/19 10:55:02 AM Server key [RSA 2048 d5:8b:1e:e2:6e:ca:c6:6b:d7:a2:14:9c:5b:64:20:d0]
    8/6/19 10:55:02 AM Public key agent authorization failed.
    8/6/19 10:55:02 AM No more authentication methods available
    8/6/19 10:55:02 AM Connection failed: Connection lost (error code is 10058)


  • #2
    OK, it turns out that BC wants the private key added to ssh-agent:

    eval `ssh-agent`
    ssh-add <private key file>
    Then all is well. For whatever reason, Cyberduck doesn't require this.


    • #3

      Cyberduck is likely looking for a default location for the key to load. Where is your key in your %UserProfile%?
      Aaron P Scooter Software


      • #4
        No %UserProfile% -- I'm on mac.

        Cyberduck lets you specify the private key file. BC does too, but for some reason that's not enough -- it also needs key added to ssh-agent.


        • #5

          Sorry, which Profile type are you using in BC4? Is this an Amazon S3 profile that can also use a public/private key pair, or an SFTP Profile with a public/private key authorization?

          I was previously assuming it was using the Amazon S3 profile type (both S3 keys and ssh used for authorization), but re-reading, this is primarily an SFTP profile, correct?

          How was your key generated and what format is the key pair in? RSA? It looks like it is in a format that BC4 does not support (fails in the above log) while it works with ssh-agent, which BC4 can then hook into and use.
          Aaron P Scooter Software


          • #6
            plain old sftp

            key generated w/ssh-keygen on mac, 2048 bit RSA