Acode icon indicating copy to clipboard operation
Acode copied to clipboard

SFTP: Invalid passphrase for key file when using ED25519 keys

Open ragavpr opened this issue 11 months ago • 2 comments

Check for existing issues

  • [x] Completed

Describe the bug / provide steps to reproduce it

Use a ED25519 ssh key to connect without passphrase, built-in SFTP client displays the error mentioning "Invalid passphrase for key file".

Even with a ED25519 key with passphrase, entering the correct passphrase results in the same error message displayed.

(Just using an RSA key currently)

Environment

Acode version: 1.11.1 (957) (f-droid) Android version: 14 Webview: 135.0.7049.100 (com.google.android.webview)

If applicable, add mockups / screenshots regarding your vision

No response

If applicable, attach your Acode.log file to this issue.

No response

ragavpr avatar Apr 29 '25 05:04 ragavpr

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment(i.e Bump!) or this will be closed in 14 days.

github-actions[bot] avatar May 31 '25 02:05 github-actions[bot]

don't close

ragavpr avatar May 31 '25 05:05 ragavpr

I have the same error message

quratoop avatar Aug 04 '25 13:08 quratoop

Does anyone know how to connect ssh using keys? It worked ssh over password but not working with keys. I have tried pasting the private key in the 'Keyfile' field and giving the path to the key but not working.

Thanks!

GonzaloHD avatar Aug 09 '25 04:08 GonzaloHD

Hey @ragavpr,

I’ve emulated your SSH server environment using a container and tested connecting with a key file, everything works. I also tried both with and without a passphrase, and didn’t encounter any issues.

Could you please provide more details or specific steps to reproduce the problem? Alternatively, you might want to double-check your configuration settings (such as port, host, etc.) to ensure everything is correct.

bajrangCoder avatar Aug 09 '25 09:08 bajrangCoder

Confirmed, in my case the ED25519 keys don't work either with or without a passphrase (even without a passphrase defined I get the error Invalid passphrase for key file). I've tried with the old RSA keys in PEM format and even these only work without a passphrase, so I've had to limit access to SFTP only to minimize the risks. I'm using version 11.11.6 (965).

LouisRed avatar Aug 29 '25 13:08 LouisRed

@bajrangCoder I confirm the issue (tested on 1.11.6 - 965 Play store build).

Attached the logcat emitted by acode to the system.

In-short system err reports: Ed25519 KeyFactory not available

https://bashupload.com/ke04L/68ca44542d4ab

UnschooledGamer avatar Sep 17 '25 05:09 UnschooledGamer

Yesterday, I tried Acode's setup with a plain Java program on Java 21, there ed25519 keys worked fine. Today I'll try with a blank Cordova app or maybe Running a Debugger on Acode.

UnschooledGamer avatar Sep 18 '25 02:09 UnschooledGamer

@ragavpr , @LouisRed

Fixed It. Now it's working fine with ED25519 KEYS, normally like with RSA 4096 KEYS.

I'll send a build here for you to test them.

UnschooledGamer avatar Sep 19 '25 15:09 UnschooledGamer

Kindly download it from the link below for testing:

https://limewire.com/d/cVMDs#V3rHLywn8f

UnschooledGamer avatar Sep 19 '25 17:09 UnschooledGamer

Kindly download it from the link below for testing:

https://limewire.com/d/cVMDs#V3rHLywn8f

It stays loading... Thanks for the try.

LouisRed avatar Sep 19 '25 23:09 LouisRed

Kindly download it from the link below for testing:

https://limewire.com/d/cVMDs#V3rHLywn8f

It stays loading... Thanks for the try.

@LouisRed, Weird. The loading should go away and connect or drop the connection (if failed) after a few mins.

If you're able to access the data directory in Android Folder. Locate com.foxdebug.acode, open it & give me the synergy.log file.

Thanks for the try.

😢 Won't leave the issue as-is after spending like three days debugging (today would be fourth incase).

UnschooledGamer avatar Sep 20 '25 02:09 UnschooledGamer

Kindly download it from the link below for testing:

https://limewire.com/d/cVMDs#V3rHLywn8f

Seems to work on my machine(tm), thanks for taking the time to look into this!

HoldYourWaffle avatar Sep 21 '25 12:09 HoldYourWaffle

ok

buyersmile avatar Sep 27 '25 21:09 buyersmile