hierynomus / sshj

ssh, scp and sftp for java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Broken transport; encountered EOF when upgrading to 0.35.0, works fine in 0.32.0

basejump opened this issue · comments

Connecting to a site works with 0.32.0 but fails with following messages when upgrading to 0.35.0
we are making the connection with a standard ssh-rsa key and a username.
We turned on debug and ran the test and added what we got back for both versions.
Let me know if there is anything else I can provide or if there is some configuration that would be needed to make the newer version work.

debug when using 0.35.0

2023-07-31 12:17:54.971 INFO  [] n.s.sshj.transport.random.JCERandom.<init> (48) - Creating new SecureRandom.
2023-07-31 12:17:54.971 DEBUG [] n.s.sshj.transport.random.JCERandom.<init> (51) - Random creation took 0 ms
2023-07-31 12:17:55.005 DEBUG [] net.schmizz.sshj.DefaultConfig.initCipherFactories (226) - Available cipher factories: [chacha20-poly1305@openssh.com, aes128-cbc, aes128-ctr, aes192-cbc, aes192-ctr, aes256-cbc, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com, blowfish-cbc, blowfish-ctr, cast128-cbc, cast128-ctr, idea-cbc, idea-ctr, serpent128-cbc, serpent128-ctr, serpent192-cbc, serpent192-ctr, serpent256-cbc, serpent256-ctr, 3des-cbc, 3des-ctr, twofish128-cbc, twofish128-ctr, twofish192-cbc, twofish192-ctr, twofish256-cbc, twofish256-ctr, twofish-cbc, arcfour, arcfour128, arcfour256]
2023-07-31 12:17:55.074 INFO  [] net.schmizz.sshj.transport.TransportImpl.sendClientIdent (209) - Client identity string: SSH-2.0-SSHJ_0.35.0
2023-07-31 12:17:55.126 INFO  [] net.schmizz.sshj.transport.TransportImpl.init (162) - Server identity string: SSH-2.0-Axway.Gateway
2023-07-31 12:17:55.127 DEBUG [] net.schmizz.sshj.SSHClient.onConnect (814) - Initiating Key Exchange for new connection
2023-07-31 12:17:55.127 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<kex done>> to `null`
2023-07-31 12:17:55.128 DEBUG [] net.schmizz.sshj.transport.KeyExchanger.sendKexInit (172) - Sending SSH_MSG_KEXINIT
2023-07-31 12:17:55.130 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<kexinit sent>> to `SOME`
2023-07-31 12:17:55.130 DEBUG [] net.schmizz.concurrent.Promise.tryRetrieve (164) - Awaiting <<kex done>>
2023-07-31 12:17:55.155 DEBUG [] net.schmizz.sshj.transport.KeyExchanger.handle (373) - Received SSH_MSG_KEXINIT
2023-07-31 12:17:55.156 DEBUG [] net.schmizz.sshj.transport.KeyExchanger.gotKexInit (234) - Negotiated algorithms: [ kex=diffie-hellman-group-exchange-sha256; sig=ssh-rsa; c2sCipher=aes128-cbc; s2cCipher=aes128-cbc; c2sMAC=hmac-sha1; s2cMAC=hmac-sha1; c2sComp=none; s2cComp=none;  ]
2023-07-31 12:17:55.168 DEBUG [] n.schmizz.sshj.transport.kex.DHGexSHA256.init (48) - Sending KEX_DH_GEX_REQUEST
2023-07-31 12:17:55.296 DEBUG [] net.schmizz.sshj.transport.KeyExchanger.handle (386) - Received kex followup data
2023-07-31 12:17:55.296 DEBUG [] n.schmizz.sshj.transport.kex.DHGexSHA256.next (54) - Got message KEXDH_31
2023-07-31 12:17:55.297 DEBUG [] n.schmizz.sshj.transport.kex.DHGexSHA256.parseGexGroup (112) - Received server p bitlength 4104
2023-07-31 12:17:55.466 DEBUG [] n.schmizz.sshj.transport.kex.DHGexSHA256.parseGexGroup (114) - Sending KEX_DH_GEX_INIT
2023-07-31 12:17:56.203 DEBUG [] net.schmizz.sshj.transport.KeyExchanger.handle (386) - Received kex followup data
2023-07-31 12:17:56.203 DEBUG [] n.schmizz.sshj.transport.kex.DHGexSHA256.next (54) - Got message KEX_DH_GEX_REPLY
2023-07-31 12:17:56.383 DEBUG [] net.schmizz.sshj.transport.KeyExchanger.verifyHost (205) - Trying to verify host key with net.schmizz.sshj.transport.verification.PromiscuousVerifier@3b88131f
2023-07-31 12:17:56.383 DEBUG [] net.schmizz.sshj.transport.KeyExchanger.sendNewKeys (191) - Sending SSH_MSG_NEWKEYS
2023-07-31 12:17:56.384 DEBUG [] net.schmizz.sshj.transport.KeyExchanger.handle (401) - Received SSH_MSG_NEWKEYS
2023-07-31 12:17:56.385 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<kexinit sent>> to `null`
2023-07-31 12:17:56.386 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<kex done>> to `SOME`
2023-07-31 12:17:56.386 DEBUG [] net.schmizz.sshj.SSHClient.doKex (831) - Key exchange took 1.259 seconds
2023-07-31 12:17:56.386 DEBUG [] net.schmizz.sshj.SSHClient.authPublickey (387) - Attempting to load key from: ./testing-ssh-rsa
2023-07-31 12:17:56.391 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<service accept>> to `null`
2023-07-31 12:17:56.391 DEBUG [] net.schmizz.sshj.transport.TransportImpl.sendServiceRequest (349) - Sending SSH_MSG_SERVICE_REQUEST for ssh-userauth
2023-07-31 12:17:56.391 DEBUG [] net.schmizz.concurrent.Promise.tryRetrieve (164) - Awaiting <<service accept>>
2023-07-31 12:17:56.604 DEBUG [] net.schmizz.sshj.transport.TransportImpl.setService (322) - Setting active service to ssh-userauth
2023-07-31 12:17:56.605 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<service accept>> to `SOME`
2023-07-31 12:17:56.605 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<authenticated>> to `null`
2023-07-31 12:17:56.606 DEBUG [] net.schmizz.sshj.userauth.UserAuthImpl.authenticate (72) - Trying `publickey` auth...
2023-07-31 12:17:56.606 DEBUG [] n.s.sshj.userauth.method.AuthPublickey.buildReq (61) - Attempting authentication using com.hierynomus.sshj.userauth.keyprovider.OpenSSHKeyV1KeyFile@1ce6a9bd
2023-07-31 12:17:56.607 INFO  [] c.h.s.u.keyprovider.OpenSSHKeyV1KeyFile.readUnencrypted (241) - Read key type: ssh-rsa
2023-07-31 12:17:56.613 DEBUG [] net.schmizz.concurrent.Promise.tryRetrieve (164) - Awaiting <<authenticated>>
2023-07-31 12:17:56.669 ERROR [] net.schmizz.sshj.transport.TransportImpl.die (590) - Dying because - Broken transport; encountered EOF
net.schmizz.sshj.transport.TransportException: Broken transport; encountered EOF
	at net.schmizz.sshj.transport.Reader.run(Reader.java:58)
2023-07-31 12:17:56.669 INFO  [] net.schmizz.sshj.transport.TransportImpl.notifyDisconnect (187) - Disconnected - UNKNOWN
2023-07-31 12:17:56.669 DEBUG [] net.schmizz.sshj.transport.KeyExchanger.notifyError (415) - Got notified of net.schmizz.sshj.transport.TransportException: Broken transport; encountered EOF
2023-07-31 12:17:56.669 DEBUG [] net.schmizz.sshj.userauth.UserAuthImpl.notifyError (57) - Notified of net.schmizz.sshj.transport.TransportException: Broken transport; encountered EOF
2023-07-31 12:17:56.669 DEBUG [] net.schmizz.sshj.transport.TransportImpl.setService (322) - Setting active service to null-service
2023-07-31 12:17:56.670 ERROR [] net.schmizz.concurrent.Promise.tryRetrieve (174) - <<authenticated>> woke to: net.schmizz.sshj.userauth.UserAuthException: Broken transport; encountered EOF
2023-07-31 12:17:56.670 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<transport close>> to `SOME`
2023-07-31 12:17:56.670 DEBUG [] net.schmizz.sshj.transport.Reader.run (70) - Stopping

Exhausted available authentication methods
net.schmizz.sshj.userauth.UserAuthException: Exhausted available authentication methods
	at app//net.schmizz.sshj.SSHClient.auth(SSHClient.java:230)
	at app//net.schmizz.sshj.SSHClient.authPublickey(SSHClient.java:345)
	at app//net.schmizz.sshj.SSHClient.authPublickey(SSHClient.java:393)
	at app//yakworks.ssh.SftpUtils.getSshClient(SftpUtils.groovy:40)
	at app//nine.banks.sftp.WellsFargoSftpSmokeTest.getSession(WellsFargoSftpSmokeTest.groovy:39)
	at app//nine.banks.sftp.WellsFargoSftpSmokeTest.setup(WellsFargoSftpSmokeTest.groovy:44)
Caused by: net.schmizz.sshj.userauth.UserAuthException: Broken transport; encountered EOF
	at app//net.schmizz.sshj.userauth.UserAuthException$1.chain(UserAuthException.java:33)
	at app//net.schmizz.sshj.userauth.UserAuthException$1.chain(UserAuthException.java:26)
	at app//net.schmizz.concurrent.Promise.deliverError(Promise.java:95)
	at app//net.schmizz.sshj.userauth.UserAuthImpl.notifyError(UserAuthImpl.java:157)
	at app//net.schmizz.sshj.transport.TransportImpl.die(TransportImpl.java:598)
	at app//net.schmizz.sshj.transport.Reader.run(Reader.java:66)
Caused by: net.schmizz.sshj.transport.TransportException: Broken transport; encountered EOF
	at app//net.schmizz.sshj.transport.Reader.run(Reader.java:58)

debug when using 0.32.0 which works

2023-07-31 12:21:24.936 INFO  [] n.s.sshj.transport.random.JCERandom.<init> (48) - Creating new SecureRandom.
2023-07-31 12:21:24.936 DEBUG [] n.s.sshj.transport.random.JCERandom.<init> (51) - Random creation took 0 ms
2023-07-31 12:21:24.975 DEBUG [] net.schmizz.sshj.DefaultConfig.initCipherFactories (229) - Available cipher factories: [chacha20-poly1305@openssh.com, aes128-cbc, aes128-ctr, aes192-cbc, aes192-ctr, aes256-cbc, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com, blowfish-cbc, blowfish-ctr, cast128-cbc, cast128-ctr, idea-cbc, idea-ctr, serpent128-cbc, serpent128-ctr, serpent192-cbc, serpent192-ctr, serpent256-cbc, serpent256-ctr, 3des-cbc, 3des-ctr, twofish128-cbc, twofish128-ctr, twofish192-cbc, twofish192-ctr, twofish256-cbc, twofish256-ctr, twofish-cbc, arcfour, arcfour128, arcfour256]
2023-07-31 12:21:25.115 INFO  [] net.schmizz.sshj.transport.TransportImpl.sendClientIdent (198) - Client identity string: SSH-2.0-SSHJ_0.32.0
2023-07-31 12:21:25.168 INFO  [] net.schmizz.sshj.transport.TransportImpl.init (162) - Server identity string: SSH-2.0-Axway.Gateway
2023-07-31 12:21:25.169 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<kex done>> to `null`
2023-07-31 12:21:25.169 DEBUG [] net.schmizz.sshj.transport.KeyExchanger.sendKexInit (172) - Sending SSH_MSG_KEXINIT
2023-07-31 12:21:25.173 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<kexinit sent>> to `SOME`
2023-07-31 12:21:25.174 DEBUG [] net.schmizz.concurrent.Promise.tryRetrieve (164) - Awaiting <<kex done>>
2023-07-31 12:21:25.202 DEBUG [] net.schmizz.sshj.transport.KeyExchanger.handle (374) - Received SSH_MSG_KEXINIT
2023-07-31 12:21:25.203 DEBUG [] net.schmizz.sshj.transport.KeyExchanger.gotKexInit (234) - Negotiated algorithms: [ kex=diffie-hellman-group-exchange-sha256; sig=ssh-rsa; c2sCipher=aes128-cbc; s2cCipher=aes128-cbc; c2sMAC=hmac-sha1; s2cMAC=hmac-sha1; c2sComp=none; s2cComp=none; rsaSHA2Support=false ]
2023-07-31 12:21:25.222 DEBUG [] n.schmizz.sshj.transport.kex.DHGexSHA256.init (48) - Sending KEX_DH_GEX_REQUEST
2023-07-31 12:21:25.410 DEBUG [] net.schmizz.sshj.transport.KeyExchanger.handle (387) - Received kex followup data
2023-07-31 12:21:25.411 DEBUG [] n.schmizz.sshj.transport.kex.DHGexSHA256.next (54) - Got message KEXDH_31
2023-07-31 12:21:25.415 DEBUG [] n.schmizz.sshj.transport.kex.DHGexSHA256.parseGexGroup (112) - Received server p bitlength 4104
2023-07-31 12:21:25.622 DEBUG [] n.schmizz.sshj.transport.kex.DHGexSHA256.parseGexGroup (114) - Sending KEX_DH_GEX_INIT
2023-07-31 12:21:26.528 DEBUG [] net.schmizz.sshj.transport.KeyExchanger.handle (387) - Received kex followup data
2023-07-31 12:21:26.529 DEBUG [] n.schmizz.sshj.transport.kex.DHGexSHA256.next (54) - Got message KEX_DH_GEX_REPLY
2023-07-31 12:21:26.716 DEBUG [] net.schmizz.sshj.transport.KeyExchanger.verifyHost (205) - Trying to verify host key with net.schmizz.sshj.transport.verification.PromiscuousVerifier@3d9f587d
2023-07-31 12:21:26.717 DEBUG [] net.schmizz.sshj.transport.KeyExchanger.sendNewKeys (191) - Sending SSH_MSG_NEWKEYS
2023-07-31 12:21:26.717 DEBUG [] net.schmizz.sshj.transport.KeyExchanger.handle (402) - Received SSH_MSG_NEWKEYS
2023-07-31 12:21:26.719 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<kexinit sent>> to `null`
2023-07-31 12:21:26.719 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<kex done>> to `SOME`
2023-07-31 12:21:26.719 DEBUG [] net.schmizz.sshj.SSHClient.doKex (807) - Key exchange took 1.55 seconds
2023-07-31 12:21:26.719 DEBUG [] net.schmizz.sshj.SSHClient.authPublickey (384) - Attempting to load key from: /Users/basejump/github/9ci/domain9/build/vault/bot/9cibot-ssh-rsa
2023-07-31 12:21:26.725 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<service accept>> to `null`
2023-07-31 12:21:26.725 DEBUG [] net.schmizz.sshj.transport.TransportImpl.sendServiceRequest (328) - Sending SSH_MSG_SERVICE_REQUEST for ssh-userauth
2023-07-31 12:21:26.726 DEBUG [] net.schmizz.concurrent.Promise.tryRetrieve (164) - Awaiting <<service accept>>
2023-07-31 12:21:26.942 DEBUG [] net.schmizz.sshj.transport.TransportImpl.setService (301) - Setting active service to ssh-userauth
2023-07-31 12:21:26.942 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<service accept>> to `SOME`
2023-07-31 12:21:26.943 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<authenticated>> to `null`
2023-07-31 12:21:26.943 DEBUG [] net.schmizz.sshj.userauth.UserAuthImpl.authenticate (72) - Trying `publickey` auth...
2023-07-31 12:21:26.943 DEBUG [] n.s.sshj.userauth.method.AuthPublickey.buildReq (61) - Attempting authentication using com.hierynomus.sshj.userauth.keyprovider.OpenSSHKeyV1KeyFile@1013871e
2023-07-31 12:21:26.944 INFO  [] c.h.s.u.keyprovider.OpenSSHKeyV1KeyFile.readUnencrypted (236) - Read key type: ssh-rsa
2023-07-31 12:21:26.948 DEBUG [] net.schmizz.concurrent.Promise.tryRetrieve (164) - Awaiting <<authenticated>>
2023-07-31 12:21:27.037 DEBUG [] net.schmizz.sshj.userauth.UserAuthImpl.handle (141) - Asking `publickey` method to handle USERAUTH_60 packet
2023-07-31 12:21:27.038 DEBUG [] n.s.sshj.userauth.method.AuthPublickey.sendSignedReq (73) - Key acceptable, sending signed request
2023-07-31 12:21:27.038 DEBUG [] n.s.sshj.userauth.method.AuthPublickey.buildReq (61) - Attempting authentication using com.hierynomus.sshj.userauth.keyprovider.OpenSSHKeyV1KeyFile@1013871e
2023-07-31 12:21:27.234 DEBUG [] net.schmizz.sshj.transport.TransportImpl.setService (301) - Setting active service to ssh-connection
2023-07-31 12:21:27.234 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<authenticated>> to `true`
2023-07-31 12:21:27.235 DEBUG [] net.schmizz.sshj.userauth.UserAuthImpl.authenticate (77) - `publickey` auth successful
2023-07-31 12:21:27.248 DEBUG [] n.schmizz.sshj.connection.ConnectionImpl.attach (73) - Attaching `session` channel (#0)
2023-07-31 12:21:27.248 DEBUG [] net.schmizz.concurrent.Promise.tryRetrieve (164) - Awaiting <<chan#0 / open>>
2023-07-31 12:21:27.301 DEBUG [] n.s.s.c.channel.direct.SessionChannel.init (108) - Initialized - < session channel: id=0, recipient=0, localWin=[winSize=2097152], remoteWin=[winSize=65536] >
2023-07-31 12:21:27.301 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<chan#0 / open>> to `SOME`
2023-07-31 12:21:27.301 INFO  [] n.s.s.c.channel.direct.SessionChannel.startSubsystem (187) - Will request `sftp` subsystem
2023-07-31 12:21:27.302 DEBUG [] n.s.s.c.channel.direct.SessionChannel.sendChannelRequest (378) - Sending channel request for `subsystem`
2023-07-31 12:21:27.302 DEBUG [] net.schmizz.concurrent.Promise.tryRetrieve (164) - Awaiting <<chan#0 / chanreq for subsystem>>
2023-07-31 12:21:27.362 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<chan#0 / chanreq for subsystem>> to `SOME`
2023-07-31 12:21:27.364 DEBUG [] n.s.s.connection.channel.Window$Remote.consume (63) - Consuming by 9 down to 65527
2023-07-31 12:21:27.429 DEBUG [] n.s.sshj.connection.channel.Window$Local.consume (63) - Consuming by 9 down to 2097143
2023-07-31 12:21:27.429 DEBUG [] net.schmizz.sshj.sftp.SFTPEngine.init (91) - Server version 3
2023-07-31 12:21:27.439 DEBUG [] net.schmizz.sshj.sftp.SFTPEngine.request (137) - Sending Request{1;OPENDIR}
2023-07-31 12:21:27.439 DEBUG [] n.s.s.connection.channel.Window$Remote.consume (63) - Consuming by 14 down to 65513
2023-07-31 12:21:27.439 DEBUG [] net.schmizz.concurrent.Promise.tryRetrieve (164) - Awaiting <<sftp / 1>>
2023-07-31 12:21:27.500 DEBUG [] n.s.sshj.connection.channel.Window$Local.consume (63) - Consuming by 14 down to 2097129
2023-07-31 12:21:27.502 DEBUG [] net.schmizz.sshj.sftp.PacketReader.handle (101) - Received HANDLE packet
2023-07-31 12:21:27.502 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<sftp / 1>> to `Buffer [rpos=5, wpos=10, size=10]`
2023-07-31 12:21:27.503 DEBUG [] net.schmizz.sshj.sftp.SFTPEngine.request (137) - Sending Request{2;READDIR}
2023-07-31 12:21:27.503 DEBUG [] n.s.s.connection.channel.Window$Remote.consume (63) - Consuming by 14 down to 65499
2023-07-31 12:21:27.503 DEBUG [] net.schmizz.concurrent.Promise.tryRetrieve (164) - Awaiting <<sftp / 2>>
2023-07-31 12:21:27.565 DEBUG [] n.s.sshj.connection.channel.Window$Local.consume (63) - Consuming by 405 down to 2096724
2023-07-31 12:21:27.567 DEBUG [] net.schmizz.sshj.sftp.PacketReader.handle (101) - Received NAME packet
2023-07-31 12:21:27.567 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<sftp / 2>> to `Buffer [rpos=5, wpos=401, size=401]`
2023-07-31 12:21:27.569 DEBUG [] net.schmizz.sshj.sftp.SFTPEngine.request (137) - Sending Request{3;READDIR}
2023-07-31 12:21:27.570 DEBUG [] n.s.s.connection.channel.Window$Remote.consume (63) - Consuming by 14 down to 65485
2023-07-31 12:21:27.570 DEBUG [] net.schmizz.concurrent.Promise.tryRetrieve (164) - Awaiting <<sftp / 3>>
2023-07-31 12:21:27.624 DEBUG [] net.schmizz.sshj.sftp.PacketReader.handle (101) - Received STATUS packet
2023-07-31 12:21:27.624 DEBUG [] n.s.sshj.connection.channel.Window$Local.consume (63) - Consuming by 34 down to 2096690
2023-07-31 12:21:27.624 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<sftp / 3>> to `Buffer [rpos=5, wpos=30, size=30]`
2023-07-31 12:21:27.625 DEBUG [] net.schmizz.sshj.sftp.RemoteDirectory.close (52) - Closing `RemoteResource{.}`
2023-07-31 12:21:27.625 DEBUG [] net.schmizz.sshj.sftp.SFTPEngine.request (137) - Sending Request{4;CLOSE}
2023-07-31 12:21:27.626 DEBUG [] n.s.s.connection.channel.Window$Remote.consume (63) - Consuming by 14 down to 65471
2023-07-31 12:21:27.626 DEBUG [] net.schmizz.concurrent.Promise.tryRetrieve (164) - Awaiting <<sftp / 4>>
2023-07-31 12:21:27.680 DEBUG [] n.s.sshj.connection.channel.Window$Local.consume (63) - Consuming by 30 down to 2096660
2023-07-31 12:21:27.680 DEBUG [] net.schmizz.sshj.sftp.PacketReader.handle (101) - Received STATUS packet
2023-07-31 12:21:27.680 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<sftp / 4>> to `Buffer [rpos=5, wpos=26, size=26]`
2023-07-31 12:21:27.685 DEBUG [] n.s.s.c.channel.direct.SessionChannel.sendClose (288) - Sending close
2023-07-31 12:21:27.685 DEBUG [] net.schmizz.concurrent.Promise.tryRetrieve (164) - Awaiting <<chan#0 / close>>
2023-07-31 12:21:27.740 DEBUG [] n.s.s.c.channel.direct.SessionChannel.gotClose (221) - Got close
2023-07-31 12:21:27.741 DEBUG [] n.schmizz.sshj.connection.ConnectionImpl.forget (89) - Forgetting `session` channel (#0)
2023-07-31 12:21:27.742 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<chan#0 / close>> to `SOME`
2023-07-31 12:21:27.744 INFO  [] net.schmizz.sshj.transport.TransportImpl.notifyDisconnect (176) - Disconnected - BY_APPLICATION
2023-07-31 12:21:27.745 DEBUG [] n.schmizz.sshj.connection.ConnectionImpl.notifyError (57) - Notified of net.schmizz.sshj.transport.TransportException: [BY_APPLICATION] Disconnected
2023-07-31 12:21:27.746 DEBUG [] net.schmizz.sshj.transport.TransportImpl.sendDisconnect (439) - Sending SSH_MSG_DISCONNECT: reason=[BY_APPLICATION], msg=[]
2023-07-31 12:21:27.746 DEBUG [] net.schmizz.sshj.transport.Reader.run (70) - Stopping
2023-07-31 12:21:27.746 DEBUG [] net.schmizz.concurrent.Promise.deliver (78) - Setting <<transport close>> to `SOME`

There have been some changes to RSA key exchange handling, which may be causing SSHJ to try newer RSA signatures before the older deprecated approach.

The Config class has a method named prioritizeSshRsaKeyAlgorithm() that you could try to see if that resolves the issue with version 0.35.

this worked.

DefaultConfig config = new DefaultConfig();
config.prioritizeSshRsaKeyAlgorithm();
SSHClient ssh = new SSHClient(config);

Relates to #740.