我已经使用 SSHJ 连接到远程计算机,并且从 IntelliJIDEA 执行此操作时效果很好。但是,当我尝试使用 maven-shade-plugin 构建“uberjar”时,我得到了如下所示的堆栈跟踪。
我确实在遮荫罐中有 org.bouncycastle.bcprov-jdk16,我的程序明确将其添加为提供者: Security.addProvider(new BouncyCastleProvider());
我试图根据此处提供的答案对 jar 进行签名:SSHJ and the Maven shade plugin Testing with 'maven-jarsigner-plugin' and 'maven-gpg-plugin' 但没有运气。
任何帮助深表感谢!谢谢!
net.schmizz.sshj.transport.TransportException: Unable to reach a settlement: [] and [aes128-ctr, aes192-ctr, aes256-ctr, arcfour256, arcfour128, aes128-cbc, 3des-cbc, blowfish-cbc, cast128-cbc, aes192-cbc, aes256-cbc, arcfour, rijndael-cbc@lysator.liu.se]
at net.schmizz.sshj.transport.Proposal.firstMatch(Proposal.java:165) ~[integration-tests-1.0-SNAPSHOT.jar:na]
at net.schmizz.sshj.transport.Proposal.negotiate(Proposal.java:147) ~[integration-tests-1.0-SNAPSHOT.jar:na]
at net.schmizz.sshj.transport.KeyExchanger.gotKexInit(KeyExchanger.java:239) ~[integration-tests-1.0-SNAPSHOT.jar:na]
at net.schmizz.sshj.transport.KeyExchanger.handle(KeyExchanger.java:364) ~[integration-tests-1.0-SNAPSHOT.jar:na]
at net.schmizz.sshj.transport.TransportImpl.handle(TransportImpl.java:478) ~[integration-tests-1.0-SNAPSHOT.jar:na]
at net.schmizz.sshj.transport.Decoder.decode(Decoder.java:127) ~[integration-tests-1.0-SNAPSHOT.jar:na]
at net.schmizz.sshj.transport.Decoder.received(Decoder.java:195) ~[integration-tests-1.0-SNAPSHOT.jar:na]
at net.schmizz.sshj.transport.Reader.run(Reader.java:72) ~[integration-tests-1.0-SNAPSHOT.jar:na]