Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the exception of establishing chain between jsch client and sshd server

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

In this issue, the editor will bring you about how to solve the abnormal link between jsch client and sshd server. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.

The following exception indicates that the encryption algorithm does not meet the key size.

The reasons found from the external network are as follows, which may be the following. Inconsistencies between versions on both sides of the jdk may report such errors. But in fact, I use the same local jdk as the 1.8-u191 version. Take a closer look, the thread stack that reported the error printed the DSA encryption algorithm, and then changed the server to use RSA and specify a key length of 2048, and then it will be fine.

The error message means, that the key likely has 1024 bits strength, because it had been generated with any JDK version before JDK 8u151-while at least 2048 bits key-strength are being expected:The security strength of SHA-1 digest algorithm is not sufficient for this key size.The reason behind this is, that the default key-size had changed from 1024 to 2048 bits with JDK 8u151. This change can also be found in the JRE/JDK crypto roadmap at datecode 2017-10-17:Upgraded the jarsigner and keytool-sigalg default to SHA256withDSA and the-keysize default to 2048 for DSA keys.The "Reverting Instructions" would be (which do not really apply for signage with Android Studio): To use a different algorithm and/or smaller keysize use the-sigalg and-keysize options of keytool and jarsigner to override the current defaults. Before this change the default values were SHA1withDSA and 1024 bits. [org.apache.sshd.server.session.ServerSession]: Exception caughtjava.security.InvalidKeyException: The security strength of SHA-1 digest algorithm is not sufficient for this key size at sun.security.provider.DSA.checkKey (DSA.java:111) at sun.security.provider.DSA.engineInitSign (DSA.java:143) at java.security.Signature$Delegate.engineInitSign (Signature.java:1177) at java.security.Signature InitSign (Signature.java:530) at org.apache.sshd.common.signature.AbstractSignature.init (AbstractSignature.java:47) at org.apache.sshd.server.kex.AbstractDHGServer.next (AbstractDHGServer.java:93) at org.apache.sshd.server.session.ServerSession.handleMessage (ServerSession.java:177) at org.apache.sshd.common.session.AbstractSession.decode (AbstractSession.java:587) at org.apache.sshd. Common.session.AbstractSession.messageReceived (AbstractSession.java:253) at org.apache.sshd.common.AbstractSessionIoHandler.messageReceived (AbstractSessionIoHandler.java:54) at org.apache.sshd.common.io.nio2.Nio2Session$2.completed (Nio2Session.java:231) at org.apache.sshd.common.io.nio2.Nio2Session$2.completed (Nio2Session.java:217) at sun.nio.ch.Invoker.invokeUnchecked (Invoker.java:126) at sun.nio .ch.Invoker $2.run (Invoker.java:218) at sun.nio.ch.AsynchronousChannelGroupImpl$1.run (AsynchronousChannelGroupImpl.java:112) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624) at java.lang.Thread.run (Thread.java:748) this is how to solve the problem of link building between jsch client and sshd server. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report