Hello,
I have an SSH server which seems to support only a single
channel per SSH session. I can connect a first "shell"
channel just fine; but as soon as I try to connect
a second channel (shell or files), the entire session
goes down due to an EOF on the stream.
Would this be a bug of my SSH server not implementing the
standard correctly? Or is it a deficiency of Jsch not
properly handling the exception? I cannot see why the
entire Session goes down just because an additional
channel can not be connected.
Or is there any possibility to query the server how
many channels it supports on a single session?
I equipped Jsch-0.1.36 with additional logging by
uncommenting the logging code, and got this for a
sample session:
Jsch:1 Connecting to 192.168.200.4 port 22
Jsch:1 Connection established
Jsch:1 Remote version string: SSH-1.99-IPSSH-6.6.0
Jsch:1 Local version string: SSH-2.0-JSCH-0.1.36
Jsch:1 CheckCiphers: aes256-cbc,aes192-cbc,aes128-cbc
Jsch:1 aes256-cbc is not available.
Jsch:1 aes192-cbc is not available.
Jsch:1 SSH_MSG_KEXINIT sent
Jsch:1 SSH_MSG_KEXINIT received
Jsch:1 kex: server->client aes128-cbc hmac-md5 none
Jsch:1 kex: client->server aes128-cbc hmac-md5 none
Jsch:1 SSH_MSG_KEXDH_INIT sent
Jsch:1 expecting SSH_MSG_KEXDH_REPLY
Jsch:1 ssh_dss_verify: signature true
Jsch:1 Host '192.168.200.4' is known and mathces the DSA host key
Jsch:1 SSH_MSG_NEWKEYS sent
Jsch:1 SSH_MSG_NEWKEYS received
Jsch:1 SSH_MSG_SERVICE_REQUEST sent
Jsch:1 SSH_MSG_SERVICE_ACCEPT received
Jsch:1 Authentications that can continue:
publickey,password,keyboard-interactive
Jsch:1 Next authentication method: publickey
Jsch:1 Authentications that can continue: password,keyboard-interactive
Jsch:1 Next authentication method: password
Jsch:1 Authentication succeeded (password).
(this is where the first channel connects successfully)
(then, connect() on the 2nd channel brings down the session:)
# Session.run
java.io.IOException: End of IO Stream Read
at com.jcraft.jsch.IO.getByte(IO.java:84)
at com.jcraft.jsch.Session.read(Session.java:793)
at com.jcraft.jsch.Session.run(Session.java:1158)
at java.lang.Thread.run(Thread.java:619)
[EMAIL PROTECTED]: disconnect
java.lang.Exception: Stack trace
at java.lang.Thread.dumpStack(Thread.java:1206)
at com.jcraft.jsch.Session.disconnect(Session.java:1448)
at com.jcraft.jsch.Session.run(Session.java:1432)
at java.lang.Thread.run(Thread.java:619)
com.jcraft.jsch.JSchException: session is down
at com.jcraft.jsch.Channel.connect(Channel.java:183)
at com.jcraft.jsch.Channel.connect(Channel.java:143)
at
org.eclipse.rse.internal.services.ssh.shell.SshHostShell.<init>(SshHostS
hell.java:108)
at
org.eclipse.rse.internal.services.ssh.shell.SshShellService.launchShell(
SshShellService.java:52)
at
org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.Shell
ServiceSubSystem.internalRunShell(ShellServiceSubSystem.java:146)
at
org.eclipse.rse.subsystems.shells.core.subsystems.RemoteCmdSubSystem.run
Shell(RemoteCmdSubSystem.java:813)
at
org.eclipse.rse.internal.shells.ui.actions.SystemCommandAction$RunShellJ
ob.run(SystemCommandAction.java:115)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Thanks,
--
Martin Oberhuber
Wind River Systems, Inc.
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users