SFTP NoSuchAlgorithmException
Brought to you by:
zc2
Hi,
I just updated my android phone and now it says the following when I try to access my server through SFTP: java.security.NoSuchAlgorithmException: EC AlgorithmParameters not available.
I just uninstalled ghost commander and all its plugins, reinstalled only ghost commander and SFTP, but the problem is still there.
Ghost Commander version 1.60.7 dated 20 Feb 2022
Ghost Commander - SFTP plugin version 2.2 dated 27 March 2022.
Thanks for any help.
What version of the sshd on your server? Or does it run some other sftp product? If it is an sshd, could you please attach here the output of the 'sshd -T' command?
It is sshd indeed. OpenSSH_8.4p1 Debian-5, OpenSSL 1.1.1n 15 Mar 2022
$ sudo sshd -T
port 22
addressfamily any
listenaddress [::]:22
listenaddress 0.0.0.0:22
usepam yes
logingracetime 120
x11displayoffset 10
maxauthtries 6
maxsessions 10
clientaliveinterval 0
clientalivecountmax 3
streamlocalbindmask 0177
permitrootlogin without-password
ignorerhosts yes
ignoreuserknownhosts no
hostbasedauthentication no
hostbasedusesnamefrompacketonly no
pubkeyauthentication yes
kerberosauthentication no
kerberosorlocalpasswd yes
kerberosticketcleanup yes
gssapiauthentication no
gssapicleanupcredentials yes
gssapikeyexchange no
gssapistrictacceptorcheck yes
gssapistorecredentialsonrekey no
gssapikexalgorithms gss-group14-sha256-,gss-group16-sha512-,gss-nistp256-sha256-,gss-curve25519-sha256-,gss-group14-sha1-,gss-gex-sha1-
passwordauthentication no
kbdinteractiveauthentication no
challengeresponseauthentication no
printmotd no
printlastlog yes
x11forwarding yes
x11uselocalhost yes
permittty yes
permituserrc yes
strictmodes yes
tcpkeepalive yes
permitemptypasswords no
compression yes
gatewayports no
usedns no
allowtcpforwarding yes
allowagentforwarding yes
disableforwarding no
allowstreamlocalforwarding yes
streamlocalbindunlink no
fingerprinthash SHA256
exposeauthinfo no
pidfile /run/sshd.pid
xauthlocation /usr/bin/xauth
ciphers chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
macs umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
banner none
forcecommand none
chrootdirectory none
trustedusercakeys none
revokedkeys none
securitykeyprovider internal
authorizedprincipalsfile none
versionaddendum none
authorizedkeyscommand none
authorizedkeyscommanduser none
authorizedprincipalscommand none
authorizedprincipalscommanduser none
hostkeyagent none
kexalgorithms curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
casignaturealgorithms ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,sk-ssh-ed25519@openssh.com,rsa-sha2-512,rsa-sha2-256
hostbasedacceptedkeytypes ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,sk-ssh-ed25519@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa
hostkeyalgorithms ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,sk-ssh-ed25519@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa
pubkeyacceptedkeytypes ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,sk-ssh-ed25519@openssh.com,rsa-sha2-512,rsa-sha2-256,ssh-rsa
loglevel INFO
syslogfacility AUTH
authorizedkeysfile .ssh/authorized_keys .ssh/authorized_keys2
hostkey /etc/ssh/ssh_host_rsa_key
hostkey /etc/ssh/ssh_host_ecdsa_key
hostkey /etc/ssh/ssh_host_ed25519_key
acceptenv LANG
acceptenv LC_*
authenticationmethods any
subsystem sftp /usr/lib/openssh/sftp-server
maxstartups 10:30:100
permittunnel no
ipqos lowdelay throughput
rekeylimit 0 0
permitopen any
permitlisten any
permituserenvironment no
pubkeyauthoptions none
When attempting to log in from my phone, I see the following on the server log:
Apr 11 13:20:38 saucisson sshd[29449]: error: Received disconnect from (…) port 43834:3: java.security.NoSuchAlgorithmException: EC AlgorithmParameters
not available [preauth]
Apr 11 13:20:38 saucisson sshd[29449]: Disconnected from (…) port 43834 [preauth]
Thank you for the config dump. I tried to put the values of HostKeyAlgorithms and HostbasedAcceptedKeyTypes from it to my sshd_config but still was able to connect with no issues.
Can you please provide more details about how were you trying to connect. Did you use password auth or a private key? If that's a private key, could you generate a key pair with the same parameters as yours and attach them here? Please also attach a logcat which shows the exception.
A private key.
Ok, I’ll (try to) do that.
How can I do that, please?
Last edit: Olivier Cailloux 2022-04-17
For logcat please refer to the bottom of this page: https://sites.google.com/site/ghostcommander1/faq
Here it is.
--------- beginning of main
04-26 23:20:04.888 I/art ( 6897): Starting a blocking GC
AddRemoveAppImageSpace
04-26 23:20:04.892 W/System ( 6897): ClassLoader referenced unknown path:
/data/app/com.ghostsq.commander-1/lib/arm
04-26 23:20:04.937 I/art ( 6897): Rejecting re-init on
previously-failed class
java.lang.Class<com.ghostsq.commander.streamprovider$dataproxy>:
java.lang.NoClassDefFoundError: Failed resolution of:
Landroid/os/ProxyFileDescriptorCallback;
04-26 23:20:04.937 I/art ( 6897): at java.lang.Object
java.lang.Class.newInstance!() (Class.java:-2)
04-26 23:20:04.937 I/art ( 6897): at
android.app.IActivityManager$ContentProviderHolder
android.app.ActivityThread.installProvider(android.content.Context,
android.app.IActivityManager$ContentProviderHolder,
android.content.pm.ProviderInfo, boolean, boolean, boolean)
(ActivityThread.java:5882)
04-26 23:20:04.937 I/art ( 6897): at void
android.app.ActivityThread.installContentProviders(android.content.Context,
java.util.List) (ActivityThread.java:5486)
04-26 23:20:04.937 I/art ( 6897): at void
android.app.ActivityThread.handleBindApplication(android.app.ActivityThread$AppBindData)
(ActivityThread.java:5425)
04-26 23:20:04.937 I/art ( 6897): at void
android.app.ActivityThread.-wrap2(android.app.ActivityThread,
android.app.ActivityThread$AppBindData) (ActivityThread.java:-1)
04-26 23:20:04.937 I/art ( 6897): at void
android.app.ActivityThread$H.handleMessage(android.os.Message)
(ActivityThread.java:1558)
04-26 23:20:04.937 I/art ( 6897): at void
android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
04-26 23:20:04.937 I/art ( 6897): at void android.os.Looper.loop()
(Looper.java:154)
04-26 23:20:04.937 I/art ( 6897): at void
android.app.ActivityThread.main(java.lang.String[])
(ActivityThread.java:6165)
04-26 23:20:04.937 I/art ( 6897): at java.lang.Object
java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[])
(Method.java:-2)
04-26 23:20:04.937 I/art ( 6897): at void
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run()
(ZygoteInit.java:888)
04-26 23:20:04.937 I/art ( 6897): at void
com.android.internal.os.ZygoteInit.main(java.lang.String[])
(ZygoteInit.java:778)
04-26 23:20:04.937 I/art ( 6897): Caused by:
java.lang.ClassNotFoundException: Didn't find class
"android.os.ProxyFileDescriptorCallback" on path: DexPathList[[zip file
"/data/app/com.ghostsq.commander-1/base.apk"],nativeLibraryDirectories=[/data/app/com.ghostsq.commander-1/lib/arm,
/system/lib, /vendor/lib]]
04-26 23:20:04.937 I/art ( 6897): at java.lang.Class
dalvik.system.BaseDexClassLoader.findClass(java.lang.String)
(BaseDexClassLoader.java:56)
04-26 23:20:04.937 I/art ( 6897): at java.lang.Class
java.lang.ClassLoader.loadClass(java.lang.String, boolean)
(ClassLoader.java:380)
04-26 23:20:04.937 I/art ( 6897): at java.lang.Class
java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
04-26 23:20:04.937 I/art ( 6897): at java.lang.Object
java.lang.Class.newInstance!() (Class.java:-2)
04-26 23:20:04.937 I/art ( 6897): at
android.app.IActivityManager$ContentProviderHolder
android.app.ActivityThread.installProvider(android.content.Context,
android.app.IActivityManager$ContentProviderHolder,
android.content.pm.ProviderInfo, boolean, boolean, boolean)
(ActivityThread.java:5882)
04-26 23:20:04.937 I/art ( 6897): at void
android.app.ActivityThread.installContentProviders(android.content.Context,
java.util.List) (ActivityThread.java:5486)
04-26 23:20:04.937 I/art ( 6897): at void
android.app.ActivityThread.handleBindApplication(android.app.ActivityThread$AppBindData)
(ActivityThread.java:5425)
04-26 23:20:04.937 I/art ( 6897): at void
android.app.ActivityThread.-wrap2(android.app.ActivityThread,
android.app.ActivityThread$AppBindData) (ActivityThread.java:-1)
04-26 23:20:04.937 I/art ( 6897): at void
android.app.ActivityThread$H.handleMessage(android.os.Message)
(ActivityThread.java:1558)
04-26 23:20:04.937 I/art ( 6897): at void
android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102)
04-26 23:20:04.937 I/art ( 6897): at void android.os.Looper.loop()
(Looper.java:154)
04-26 23:20:04.937 I/art ( 6897): at void
android.app.ActivityThread.main(java.lang.String[])
(ActivityThread.java:6165)
04-26 23:20:04.937 I/art ( 6897): at java.lang.Object
java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[])
(Method.java:-2)
04-26 23:20:04.937 I/art ( 6897): at void
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run()
(ZygoteInit.java:888)
04-26 23:20:04.937 I/art ( 6897): at void
com.android.internal.os.ZygoteInit.main(java.lang.String[])
(ZygoteInit.java:778)
04-26 23:20:04.937 I/art ( 6897):
04-26 23:20:05.286 D/GhostCommanderActivity( 6897): Started 1.60.7
04-26 23:20:05.403 I/Adreno-EGL( 6897): <qegldrvapi_eglinitialize:379>: EGL
1.4 QUALCOMM build:
Nondeterministic_AU_msm8916_32_LA.BR.1.2.9_RB1__release_AU (I750f7f2fa6)
04-26 23:20:05.403 I/Adreno-EGL( 6897): OpenGL ES Shader Compiler Version:
XE031.09.00.03
04-26 23:20:05.403 I/Adreno-EGL( 6897): Build Date: 02/18/17 Sat
04-26 23:20:05.403 I/Adreno-EGL( 6897): Local Branch:
04-26 23:20:05.403 I/Adreno-EGL( 6897): Remote Branch:
quic/LA.BR.1.2.9_rb1.12
04-26 23:20:05.403 I/Adreno-EGL( 6897): Local Patches: NONE
04-26 23:20:05.403 I/Adreno-EGL( 6897): Reconstruct Branch: NOTHING
04-26 23:20:05.406 I/OpenGLRenderer( 6897): Initialized EGL, version 1.4
04-26 23:20:05.406 D/OpenGLRenderer( 6897): Swap behavior 1
04-26 23:20:05.407 W/RenderThread( 6942): type=1400 audit(0.0:2376): avc:
denied { read } for uid=10120 name="gpuclk" dev="sysfs" ino=11560
scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:sysfs:s0
tclass=file permissive=0
04-26 23:20:05.411 W/Adreno-ES20( 6897): <get_gpu_clk:229>: open failed:
errno 13
04-26 23:20:05.754 I/GhostCommanderActivity( 6897): Action:
android.intent.action.MAIN
04-26 23:20:05.802 W/ListEngine( 6897): Handler was already set
04-26 23:20:05.818 D/HomeAdapter( 6897): com.ghostsq.commander.sftp
04-26 23:20:05.912 W/InputMethodManager( 6897): Ignoring onBind: cur
seq=1359, given seq=1358
04-26 23:20:05.949 D/GhostCommanderActivity( 6897): invalidating...
04-26 23:20:05.971 I/com.ghostsq.commander.adapters.FSEngines$ListEngine(
6897): Engine thread is not alive
04-26 23:20:06.479 I/ExifInterface_JNI( 6897): Raw image not detected
04-26 23:20:06.487 W/ExifInterface( 6897): Skip the tag entry since tag
number is not defined: 2
--------- beginning of system
04-26 23:20:06.568 W/PackageParser( 6897): Unknown element under
<manifest>: queries at /storage/emulated/0/Download/manager.apk Binary XML
file line #21
04-26 23:20:06.736 D/skia ( 6897): --- SkAndroidCodec::NewFromStream
returned null
04-26 23:20:06.736 W/ThumbnailsThread( 6897): failed to get an image bounds
04-26 23:20:06.736 E/ThumbnailsThread( 6897): createImageThubnail() failed
for /storage/emulated/0/Download/circulationaha.120.048238.fig01.tif
04-26 23:20:07.762 D/GhostCommanderActivity( 6897): invalidating...
04-26 23:20:09.232 I/com.ghostsq.commander.adapters.HomeAdapter( 6897):
prepareToDestroy()
04-26 23:20:09.232 I/com.ghostsq.commander.adapters.HomeAdapter( 6897):
terminateOperation()
04-26 23:20:09.236 D/GhostCommanderActivity( 6897): invalidating...
04-26 23:20:09.332 D/GhostCommanderActivity( 6897): invalidating...
04-26 23:20:10.516 I/CA ( 6897): sftp package is
/data/app/com.ghostsq.commander.sftp-1/base.apk
04-26 23:20:10.550 I/CA ( 6897): Class has been loaded class
com.ghostsq.commander.sftp.sftp
04-26 23:20:10.617 D/SFTPAdapter( 6897): Created instance #1
04-26 23:20:10.624 I/com.ghostsq.commander.adapters.FavsAdapter( 6897):
prepareToDestroy()
04-26 23:20:10.624 I/com.ghostsq.commander.adapters.FavsAdapter( 6897):
terminateOperation()
04-26 23:20:10.627 V/SFTPAdapter( 6897): readSource() is called in thread 1
04-26 23:20:10.633 W/ListEngine( 6897): Handler was already set
04-26 23:20:10.634 D/GhostCommanderActivity( 6897): invalidating...
04-26 23:20:10.634 I/ListEngine( 6897): ListEngine started
04-26 23:20:10.635 V/SFTPAdapter( 6897): connectAndLogin() is called in
thread 19127
04-26 23:20:10.635 V/SFTPAdapter( 6897): creating a new session
04-26 23:20:11.989 D/JSch ( 6897): kex proposal before removing
unavailable algos is: curve25519-sha256,curve25519-sha256@libssh.org
,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
04-26 23:20:11.990 D/JSch ( 6897): kex proposal after removing
unavailable algos is:
ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
04-26 23:20:12.013 D/JSch ( 6897): server_host_key proposal before
removing unavailable algos is:
ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa
04-26 23:20:12.014 D/JSch ( 6897): server_host_key proposal after
removing unavailable algos is:
ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa
04-26 23:20:12.014 D/JSch ( 6897): server_host_key proposal before
known_host reordering is:
ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa
04-26 23:20:12.014 D/JSch ( 6897): server_host_key proposal after
known_host reordering is:
ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa
04-26 23:20:12.425 E/SFTPAdapter( 6897): sftp://192.168.1.10/home/olivier
04-26 23:20:12.425 E/SFTPAdapter( 6897): com.jcraft.jsch.JSchException:
Session.connect: java.security.NoSuchAlgorithmException: EC
AlgorithmParameters not available
04-26 23:20:12.425 E/SFTPAdapter( 6897): at
com.jcraft.jsch.Session.connect(Session.java:570)
04-26 23:20:12.425 E/SFTPAdapter( 6897): at
com.jcraft.jsch.Session.connect(Session.java:185)
04-26 23:20:12.425 E/SFTPAdapter( 6897): at
com.ghostsq.commander.sftp.SFTPAdapter.connectAndLogin(SFTPAdapter.java:232)
04-26 23:20:12.425 E/SFTPAdapter( 6897): at
com.ghostsq.commander.sftp.ListEngine.run(ListEngine.java:55)
04-26 23:20:12.425 E/SFTPAdapter( 6897): Caused by:
java.security.NoSuchAlgorithmException: EC AlgorithmParameters not available
04-26 23:20:12.425 E/SFTPAdapter( 6897): at
sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
04-26 23:20:12.425 E/SFTPAdapter( 6897): at
java.security.Security.getImpl(Security.java:587)
04-26 23:20:12.425 E/SFTPAdapter( 6897): at
java.security.AlgorithmParameters.getInstance(AlgorithmParameters.java:191)
04-26 23:20:12.425 E/SFTPAdapter( 6897): at
com.jcraft.jsch.jce.SignatureECDSAN.setPubKey(SignatureECDSAN.java:65)
04-26 23:20:12.425 E/SFTPAdapter( 6897): at
com.jcraft.jsch.KeyExchange.verify(KeyExchange.java:342)
04-26 23:20:12.425 E/SFTPAdapter( 6897): at
com.jcraft.jsch.DHECN.next(DHECN.java:178)
04-26 23:20:12.425 E/SFTPAdapter( 6897): at
com.jcraft.jsch.Session.connect(Session.java:331)
04-26 23:20:12.425 E/SFTPAdapter( 6897): ... 3 more
04-26 23:20:12.426 V/SFTPAdapter( 6897): disconnect() is called in thread
19127
04-26 23:20:12.426 D/SFTPAdapter( 6897): Disconnecting...
04-26 23:20:12.426 E/ListEngine( 6897): Can't get the items list
04-26 23:20:12.426 E/ListEngine( 6897): com.jcraft.jsch.JSchException:
Session.connect: java.security.NoSuchAlgorithmException: EC
AlgorithmParameters not available
04-26 23:20:12.426 E/ListEngine( 6897): at
com.jcraft.jsch.Session.connect(Session.java:570)
04-26 23:20:12.426 E/ListEngine( 6897): at
com.jcraft.jsch.Session.connect(Session.java:185)
04-26 23:20:12.426 E/ListEngine( 6897): at
com.ghostsq.commander.sftp.SFTPAdapter.connectAndLogin(SFTPAdapter.java:232)
04-26 23:20:12.426 E/ListEngine( 6897): at
com.ghostsq.commander.sftp.ListEngine.run(ListEngine.java:55)
04-26 23:20:12.426 E/ListEngine( 6897): Caused by:
java.security.NoSuchAlgorithmException: EC AlgorithmParameters not available
04-26 23:20:12.426 E/ListEngine( 6897): at
sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
04-26 23:20:12.426 E/ListEngine( 6897): at
java.security.Security.getImpl(Security.java:587)
04-26 23:20:12.426 E/ListEngine( 6897): at
java.security.AlgorithmParameters.getInstance(AlgorithmParameters.java:191)
04-26 23:20:12.426 E/ListEngine( 6897): at
com.jcraft.jsch.jce.SignatureECDSAN.setPubKey(SignatureECDSAN.java:65)
04-26 23:20:12.426 E/ListEngine( 6897): at
com.jcraft.jsch.KeyExchange.verify(KeyExchange.java:342)
04-26 23:20:12.426 E/ListEngine( 6897): at
com.jcraft.jsch.DHECN.next(DHECN.java:178)
04-26 23:20:12.426 E/ListEngine( 6897): at
com.jcraft.jsch.Session.connect(Session.java:331)
04-26 23:20:12.426 E/ListEngine( 6897): ... 3 more
04-26 23:20:12.426 E/ListEngine( 6897):
java.security.NoSuchAlgorithmException: EC AlgorithmParameters not available
04-26 23:20:12.426 V/SFTPAdapter( 6897): disconnect() is called in thread
19127
04-26 23:20:12.426 D/SFTPAdapter( 6897): Disconnecting...
04-26 23:20:12.427 V/SFTPAdapter( 6897): UI thread finishes the items
obtaining. reader=Thread[SFTPAdapter.ListEngine,5,]
04-26 23:20:12.477 I/com.ghostsq.commander.sftp.ListEngine( 6897): Engine
thread is not alive
04-26 23:20:21.650 D/OpenGLRenderer( 6897): endAllActiveAnimators on
0x92389c80 (MenuPopupWindow$MenuDropDownListView) with handle 0x9093b250
04-26 23:20:22.937 D/OpenGLRenderer( 6897): endAllActiveAnimators on
0x91730b00 (MenuPopupWindow$MenuDropDownListView) with handle 0x9093b520
04-26 23:20:23.247 I/GhostCommanderActivity( 6897): Saving Instance State
04-26 23:20:49.988 W/InputEventReceiver( 6897): Attempted to finish an
input event but the input event receiver has already been disposed.
04-26 23:21:09.282 D/OpenGLRenderer( 6897): endAllActiveAnimators on
0x90e61180 (MenuPopupWindow$MenuDropDownListView) with handle 0x90e67990
04-26 23:21:24.968 D/GhostCommanderActivity( 6897): onActivityResult( 1,
null )
04-26 23:21:25.335 W/ListEngine( 6897): Handler was already set
04-26 23:21:25.336 V/SFTPAdapter( 6897): readSource() is called in thread 1
04-26 23:21:25.338 W/ListEngine( 6897): Handler was already set
04-26 23:21:25.338 I/ListEngine( 6897): ListEngine started
04-26 23:21:25.339 V/SFTPAdapter( 6897): connectAndLogin() is called in
thread 19132
04-26 23:21:25.339 V/SFTPAdapter( 6897): creating a new session
04-26 23:21:25.394 I/com.ghostsq.commander.adapters.FSEngines$ListEngine(
6897): Engine thread is not alive
04-26 23:21:25.445 D/JSch ( 6897): kex proposal before removing
unavailable algos is: curve25519-sha256,curve25519-sha256@libssh.org
,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
04-26 23:21:25.445 D/JSch ( 6897): kex proposal after removing
unavailable algos is:
ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
04-26 23:21:25.448 D/JSch ( 6897): server_host_key proposal before
removing unavailable algos is:
ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa
04-26 23:21:25.448 D/JSch ( 6897): server_host_key proposal after
removing unavailable algos is:
ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa
04-26 23:21:25.448 D/JSch ( 6897): server_host_key proposal before
known_host reordering is:
ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa
04-26 23:21:25.448 D/JSch ( 6897): server_host_key proposal after
known_host reordering is:
ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256,ssh-rsa
04-26 23:21:25.561 D/skia ( 6897): --- SkAndroidCodec::NewFromStream
returned null
04-26 23:21:25.561 W/ThumbnailsThread( 6897): failed to get an image bounds
04-26 23:21:25.562 E/ThumbnailsThread( 6897): createImageThubnail() failed
for /storage/emulated/0/Download/circulationaha.120.048238.fig01.tif
04-26 23:21:25.723 E/SFTPAdapter( 6897): sftp://192.168.1.10/home/olivier
04-26 23:21:25.723 E/SFTPAdapter( 6897): com.jcraft.jsch.JSchException:
Session.connect: java.security.NoSuchAlgorithmException: EC
AlgorithmParameters not available
04-26 23:21:25.723 E/SFTPAdapter( 6897): at
com.jcraft.jsch.Session.connect(Session.java:570)
04-26 23:21:25.723 E/SFTPAdapter( 6897): at
com.jcraft.jsch.Session.connect(Session.java:185)
04-26 23:21:25.723 E/SFTPAdapter( 6897): at
com.ghostsq.commander.sftp.SFTPAdapter.connectAndLogin(SFTPAdapter.java:232)
04-26 23:21:25.723 E/SFTPAdapter( 6897): at
com.ghostsq.commander.sftp.ListEngine.run(ListEngine.java:55)
04-26 23:21:25.723 E/SFTPAdapter( 6897): Caused by:
java.security.NoSuchAlgorithmException: EC AlgorithmParameters not available
04-26 23:21:25.723 E/SFTPAdapter( 6897): at
sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
04-26 23:21:25.723 E/SFTPAdapter( 6897): at
java.security.Security.getImpl(Security.java:587)
04-26 23:21:25.723 E/SFTPAdapter( 6897): at
java.security.AlgorithmParameters.getInstance(AlgorithmParameters.java:191)
04-26 23:21:25.723 E/SFTPAdapter( 6897): at
com.jcraft.jsch.jce.SignatureECDSAN.setPubKey(SignatureECDSAN.java:65)
04-26 23:21:25.723 E/SFTPAdapter( 6897): at
com.jcraft.jsch.KeyExchange.verify(KeyExchange.java:342)
04-26 23:21:25.723 E/SFTPAdapter( 6897): at
com.jcraft.jsch.DHECN.next(DHECN.java:178)
04-26 23:21:25.723 E/SFTPAdapter( 6897): at
com.jcraft.jsch.Session.connect(Session.java:331)
04-26 23:21:25.723 E/SFTPAdapter( 6897): ... 3 more
04-26 23:21:25.723 V/SFTPAdapter( 6897): disconnect() is called in thread
19132
04-26 23:21:25.723 D/SFTPAdapter( 6897): Disconnecting...
04-26 23:21:25.724 E/ListEngine( 6897): Can't get the items list
04-26 23:21:25.724 E/ListEngine( 6897): com.jcraft.jsch.JSchException:
Session.connect: java.security.NoSuchAlgorithmException: EC
AlgorithmParameters not available
04-26 23:21:25.724 E/ListEngine( 6897): at
com.jcraft.jsch.Session.connect(Session.java:570)
04-26 23:21:25.724 E/ListEngine( 6897): at
com.jcraft.jsch.Session.connect(Session.java:185)
04-26 23:21:25.724 E/ListEngine( 6897): at
com.ghostsq.commander.sftp.SFTPAdapter.connectAndLogin(SFTPAdapter.java:232)
04-26 23:21:25.724 E/ListEngine( 6897): at
com.ghostsq.commander.sftp.ListEngine.run(ListEngine.java:55)
04-26 23:21:25.724 E/ListEngine( 6897): Caused by:
java.security.NoSuchAlgorithmException: EC AlgorithmParameters not available
04-26 23:21:25.724 E/ListEngine( 6897): at
sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
04-26 23:21:25.724 E/ListEngine( 6897): at
java.security.Security.getImpl(Security.java:587)
04-26 23:21:25.724 E/ListEngine( 6897): at
java.security.AlgorithmParameters.getInstance(AlgorithmParameters.java:191)
04-26 23:21:25.724 E/ListEngine( 6897): at
com.jcraft.jsch.jce.SignatureECDSAN.setPubKey(SignatureECDSAN.java:65)
04-26 23:21:25.724 E/ListEngine( 6897): at
com.jcraft.jsch.KeyExchange.verify(KeyExchange.java:342)
04-26 23:21:25.724 E/ListEngine( 6897): at
com.jcraft.jsch.DHECN.next(DHECN.java:178)
04-26 23:21:25.724 E/ListEngine( 6897): at
com.jcraft.jsch.Session.connect(Session.java:331)
04-26 23:21:25.724 E/ListEngine( 6897): ... 3 more
04-26 23:21:25.724 E/ListEngine( 6897):
java.security.NoSuchAlgorithmException: EC AlgorithmParameters not available
04-26 23:21:25.724 V/SFTPAdapter( 6897): disconnect() is called in thread
19132
04-26 23:21:25.724 D/SFTPAdapter( 6897): Disconnecting...
04-26 23:21:25.724 V/SFTPAdapter( 6897): UI thread finishes the items
obtaining. reader=Thread[SFTPAdapter.ListEngine,5,]
04-26 23:21:25.735 I/com.ghostsq.commander.sftp.ListEngine( 6897): Engine
thread is not alive
04-26 23:21:27.629 D/GhostCommanderActivity( 6897): invalidating...
04-26 23:21:31.123 W/ListEngine( 6897): Handler was already set
04-26 23:21:31.124 D/GhostCommanderActivity( 6897): invalidating...
04-26 23:21:31.187 D/GhostCommanderActivity( 6897): invalidating...
04-26 23:21:31.208 I/com.ghostsq.commander.adapters.FSEngines$ListEngine(
6897): Engine thread is not alive
04-26 23:21:36.353 D/GhostCommanderActivity( 6897): invalidating...
04-26 23:21:40.680 D/GhostCommanderActivity( 6897): invalidating...
04-26 23:21:44.972 D/OpenGLRenderer( 6897): endAllActiveAnimators on
0x90ea6680 (MenuPopupWindow$MenuDropDownListView) with handle 0x92193ad0
04-26 23:21:46.257 D/OpenGLRenderer( 6897): endAllActiveAnimators on
0x91713b80 (MenuPopupWindow$MenuDropDownListView) with handle 0x92193a20
04-26 23:21:46.533 I/GhostCommanderActivity( 6897): Saving Instance State</manifest></get_gpu_clk:229></qegldrvapi_eglinitialize:379></com.ghostsq.commander.streamprovider$dataproxy>
Le dim. 17 avr. 2022 à 18:09, zc2 zc2@users.sourceforge.net a écrit :
Related
Bugs:
#90Could you please post either a key pair similar to you use or an exact command line options to generate such pair?
Well, now my PEM keys manager is empty, and the bug still happens. So, I suppose “a key pair similar to” the one I use is the empty key pair ;-).
What can I do to help push the investigation further?
What's your current Android version?
7.1.1
Interestingly, I just noticed that the problem happens even if I delete my (sole) private key from the PEM keys manager (therefore leaving it empty).
Have you tried with
passwordauthentication noon your server?Last edit: Olivier Cailloux 2022-04-17
Yes, also the public key method has a priority.
According to this manual, the Elliptic Curve "EC" algorithm is supported only starting with the android API 26 (Oreo). Your server should match your outdated client device.
I'd suggest you to try to remove the following host key algorithms from your sshd_config:
"ecdsa-sha2-nistp256"
"ecdsa-sha2-nistp384"
"ecdsa-sha2-nistp521"
I tried that, and was able to connect from a phone with android 7.0
Last edit: zc2 2022-05-21
Thanks for this.
I couldn’t find how to disable those keys, but I added the following to my server configuration.
I could immediately connect (after
service sshd restart).Please note that “outdated” has a derogatory connotation. I suppose that you do not want to suggest that I am doing something wrong with keeping a device for longer than average (which on the contrary is a good thing to do, IMHO, considering climate change issues and resource depletion). (Also, the problem is not really with the device per se but rather with the updated API that is not available for my client device, but that’s not your fault, nor mine, of course.)
On a more technical side, the suggested workaround does indeed work but is imperfect, as I now have to globally disable the (better) EC algorithm on my server so that other (more modern) clients may not use the increased security that it provides; and as it requires a subtle configuration change that some other users might stumble upon. Would you perhaps consider changing the code of GhostCommander in a future update so that it does not attempt to use EC if not available on the device? I’d be very grateful for this, as well, I suppose, as other users using an older device.
No offense intended, I use an old phone myself (Samsung S8+ with Android Pie). Just meant the components and protocols should match.
To implement the logic you suggested, I would need to include the SSH library as a source and make changes in it, which I would avoid since that makes things more difficult (would need to solve compatibility issues, et.). BTW, for a reason I don't understand, I cannot reproduce the initial exception you posted on an android 7 (and even older) devices anymore. However, I've made a SFTP plugin build which uses the latest version of the SSH library, you may want to give it a try.
Apologies for the editing noise, only the sourceforge UI is such fun to work with.
Excuse me for tagging along on this bug report, but I have what I think is exactly the same problem. What I find interesting is that the version 2.2 sftp plugin exhibits the bug whereas the version 2.1.1 sftp plugin does not exhibit the bug.
I haven't changed anything on my sftp server, nor have I changed anything on my phone (other than upgrading gc's sftp plugin from v2.1.1 to v2.2).
(FWIW, the build that you linked to in the previous post also fails for me.)
Does "Your server should match your outdated client device." hold if the only thing that I've changed is the sftp plugin?
(PS: If you would prefer me to start a new bug report, just let me know.)
Last edit: jaimet 2022-12-13
I believe it does. v2.2 uses a modern version of the JSch library, but v2.1 used the original version which was not maintained for a long. The new one gives priorities to more secure crypto algorithms which may not be available on your device (like I explained in this thread). However, the older version used some deprecated algorithms, which probably still available on your phone.
Do you have writing access to the server's config? Did you try to remove the "EC" family of suits like I suggested? What version of the OS on your phone?
Apologies for the delay in replying.
I have just installed v1.62.2 (*) on my new phone, and I no longer have this bug. (The bug where I had to input my SFTP password twice has also disappeared.) Thank you!
(*) The changelog says that the main app now contains the SFTP plugin, so I have not installed any separate SFTP plugin.
Thank you for testing.