Jsch jar package not connected to SSH algorithm negotiation fail error

Source: Internet
Author: User
Tags sha1

error message:

Com.jcraft.jsch.JSchException:Algorithm Negotiation Fail

Problem Analysis:

The sshd configuration does not open an algorithm that supports Jsch jar requirements, the default open algorithm can be seen in the man sshd_config, it is possible that the advanced version of sshd turns off some of the algorithms by default (version 7.5 has this problem).

Hash algorithm view: Ssh-q mac

KEX algorithm view: Ssh-q KEX

Transfer encryption Algorithm view: Ssh-q cipher

The above command to see the algorithm is the SSHD support algorithm, not the algorithm has been opened

Solution:

in the /etc/ssh/sshd_config at the end of the file Add command line, open the algorithm:

Kexalgorithms DIFFIE-HELLMAN-GROUP1-SHA1,DIFFIE-HELLMAN-GROUP14-SHA1,DIFFIE-HELLMAN-GROUP-EXCHANGE-SHA1, diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521, Diffie-hellman-group1-sha1,[email protected]

Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256, Arcfour,blowfish-cbc,cast128-cbc

Restart Service: Service sshd Restart

Problem solving.


Jsch jar package not connected to SSH algorithm negotiation fail error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.