Hi,
Yes we tried. Our setup is something like this. User is authenticated using
a kerberos ticket. We initially used "exec" channel. Since the users of
that server, only has rssh accessibility, we moved to "sftp" instead of
"exec". Even with that, we I try to execute a command (like pwd()), I'm
getting the following error.
ERROR: org.scigap.iucig.filemanager.CommandExecutor - Error occured..
java.lang.Exception: java.lang.Exception: com.jcraft.jsch.JSchException:
java.io.IOException: inputstream is closed
at
org.scigap.iucig.filemanager.CommandExecutor.pwd(CommandExecutor.java:271)
at
org.scigap.iucig.filemanager.CommandExecutor.<init>(CommandExecutor.java:68)
at
org.scigap.iucig.controller.FileManagerController.executeCommand(FileManagerController.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at
org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
at
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
at
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:100)
at
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:604)
at
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:565)
at
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:193)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.Exception: com.jcraft.jsch.JSchException:
java.io.IOException: inputstream is closed
at
org.scigap.iucig.filemanager.util.CommandCentral.pwdSFTP(CommandCentral.java:94)
at
org.scigap.iucig.filemanager.CommandExecutor.pwd(CommandExecutor.java:261)
... 38 more
Caused by: com.jcraft.jsch.JSchException: java.io.IOException: inputstream
is closed
at com.jcraft.jsch.ChannelSftp.start(ChannelSftp.java:315)
at com.jcraft.jsch.Channel.connect(Channel.java:152)
at com.jcraft.jsch.Channel.connect(Channel.java:145)
at
org.scigap.iucig.filemanager.util.CommandCentral.pwdSFTP(CommandCentral.java:89)
... 39 more
Caused by: java.io.IOException: inputstream is closed
at com.jcraft.jsch.ChannelSftp.fill(ChannelSftp.java:2871)
at com.jcraft.jsch.ChannelSftp.header(ChannelSftp.java:2895)
at com.jcraft.jsch.ChannelSftp.start(ChannelSftp.java:262)
... 42 more
For your reference, our code is at [1]. You can check a method like pwdSFTP().
Appreciate your help on this.
Thanks..
Chathuri
[1]
https://github.com/SciGaP/IUGateway/blob/sftp/sda/src/main/java/org/scigap/iucig/filemanager/util/CommandCentral.java
Post by Lothar KimmeringerPost by Chathuri WimalasenaIs there a way we can create a session using jsch with a user
who has only rssh (http://www.pizzashack.org/rssh/index.shtml)
access. (That means, particular user does not have login access
to shell. He has restricted access to that host).
have you tried and failed? I'm doing scp and sftp all the time
with servers that have only a restricted shell (i.e. my own).
Cheers, Lothar
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
JSch-users mailing list
https://lists.sourceforge.net/lists/listinfo/jsch-users