Comments (8)
Hi @HubertOT,
No there is not any sort of "answer" that a server is supposed to provide.
This extension is documented by OpenSSH as follows:
1.11 transport: SSH2_MSG_EXT_INFO during user authentication
This protocol extension allows the SSH2_MSG_EXT_INFO to be sent
during user authentication. RFC8308 does allow a second
SSH2_MSG_EXT_INFO notification, but it may only be sent at the end
of user authentication and this is too late to signal per-user
server signature algorithms.
Support for receiving the SSH2_MSG_EXT_INFO message during user
authentication is signalled by the client including a
"[email protected]" key via its initial SSH2_MSG_EXT_INFO
set after the SSH2_MSG_NEWKEYS message.
A server that supports this extension MAY send a second
SSH2_MSG_EXT_INFO message any time after the client's first
SSH2_MSG_USERAUTH_REQUEST, regardless of whether it succeed or fails.
The client SHOULD be prepared to update the server-sig-algs that
it received during an earlier SSH2_MSG_EXT_INFO with the later one.
Thanks,
Jeremy
from jsch.
Hi @HubertOT,
- Can you please provide a full backtrace?
- Can you please provide a full copy of JSch logs?
- Can you please confirm the last version of JSch that works for you (and thus the earliest release that fails)?
Thanks,
Jeremy
from jsch.
Hi @norrisjeremy,
- java.io.IOException: End of IO Stream Read
at com.jcraft.jsch.IO.getByte(IO.java:95)
at com.jcraft.jsch.Session.read(Session.java:1232)
at com.jcraft.jsch.UserAuthNone.start(UserAuthNone.java:54)
at com.jcraft.jsch.Session.connect(Session.java:413)
at com.jcraft.jsch.Session.connect(Session.java:199)
at org.springframework.integration.sftp.session.SftpSession.connect(SftpSession.java:292)
at org.springframework.integration.sftp.session.DefaultSftpSessionFactory.getSession(DefaultSftpSessionFactory.java:397) - Unfortunately as stated I am not allowed to provide full JSCH logs as mentioned otherwise would have done that in first place.
- The issue does not occur using JSch 0.2.14, but happens only for JSch 0.2.15 and 0.2.16. Adding/Setting, using JSch 0.2.15 or 0.2.16, the property "enable_ext_info_in_auth" with value "no" in the JSch config resolves the issue. So it looks to be introduced with support for this new extension.
One of the sFTP-server brands to which the connection fails without setting JSch property "enable_ext_info_in_auth" value to "no", is HostedFTP.
With kind regards,
Hubert
from jsch.
Hi @HubertOT,
My best guess is that some of the servers to which you are connecting do not work correctly if the client advertises the [email protected]
extension in it's ext-info
message, so you'll likely just have to disable this via the enable_ext_info_in_auth
setting as you already found.
Thanks,
Jeremy
from jsch.
Thank you @norrisjeremy, Will try to confirm this for one of the sFTP-servers and if needed will come back.
Is the server expected to give an answer on the [email protected]
advertisement? If so, what answers would be possible for verification?
from jsch.
@norrisjeremy, Maybe a stupid question, but if the server does not provide a (clear) answer, should the client then not be robust against any behavior of the server, so have a fallback mechanism to the "old" path not supporting the SSH2_MSG_EXT_INF
in case anything goes wrong?
from jsch.
Hi @HubertOT,
That's not how SSH2_MSG_EXT_INFO
messages work: it's a unidirectional message allowing a client to advertise to a server (or vice versa) a set of key/value tuples. You can read up further on this in RFC-8308 to better understand.
Thanks,
Jeremy
from jsch.
Hi @norrisjeremy, Thank you very much for you quick responses and help. It's really appreciated. Will read the mentioned RFC.
With kind regards,
Hubert
from jsch.
Related Issues (20)
- How to figure the server-side ciphers? HOT 4
- Full List of Config Options For Backwards Compatibility with Original Jsch
- Merge release branch? HOT 1
- Question about ssh-rsa deprecation HOT 5
- Ordering of "ls"-method possible? HOT 2
- [Question] Disconnecting: Received data for nonexistent channel 0.
- error in channel connection HOT 7
- Some bizarre exception when using SSH key to log on HOT 3
- failed to parse public key error with successful connection HOT 3
- sftp server failed to read file HOT 4
- Support for rsa2048-sha256 Key exchange HOT 6
- Jenkins com.jcraft.jsch.JSchAlgoNegoFailException: Algorithm negotiation fail HOT 5
- Connecting to Euler server, executing write and execute scripts in one connection, memory error HOT 1
- Does JSCH support JDK17 HOT 4
- Specify certificate file in ssh connection HOT 1
- Exception During Authentication - IOException: End of IO Stream Read HOT 5
- Packet corrupt HOT 2
- "JSchException: key type ssh-rp is not supported" Error on adding identity HOT 3
- Multi-Release jar for Java8 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsch.