gencywinter commented on issue #791: URL: https://github.com/apache/mina-sshd/issues/791#issuecomment-3140311482
Sorry. I just want to discuss whether there are any solutions for this usage. It's just CLI. It's only Client, Apache Mina Sshd 2.10.0 - 2.13.0, Linux. I do not know what server is. > How are files copied? No file. I do just send a lot of commands at once. my client code sample: ```java client = SshClient.setUpDefaultClient(); ... client.start(); ... ConnectFuture connectFuture = client.connect("userName", "10.137.60.54", "22"); ClientSession session = connectFuture.getSession(); ... // check session ... // init Channel ChannelShell shellChannel = session.createShellChannel(); shellChannel.setPtyType("xterm"); XxxxInputStream inputStream = new XxxxInputStream() shellChannel.setIn(inputStream); XxxxOutputStream outputStream = new XxxxOutputStream(); shellChannel.setOut(outputStream); // send command String command = "display xxx\r display xxx\r ... quit\r"; // a serial commands inputStream.print(command) while (true) { String result = outputStream.read(); // process result } ``` Sequence diagram <img width="1025" height="586" alt="Image" src="https://github.com/user-attachments/assets/dd359f78-49b7-4b39-8210-2ddb128d9843" /> ```plantuml participant "MyClient" as Foo1 participant "XxxxInputStream" as Foo2 participant "XxxxOutputStream" as Foo3 participant "ChannelOutputStream" as Foo6 participant NioSession as Foo4 participant PtyCapableClientChannel as Foo5 participant RemoteWindow as Foo7 participant LocalWindow as Foo8 Foo1 -> Foo2 : Commands Foo2 -> Foo2 : save Foo5 -> Foo2 : read Foo2 --> Foo5 : data Foo5 -> Foo6 : flush Foo6 -> Foo7 : waitForSpace Foo6 -> Foo7 : waitAndConsume Foo6 -> Foo4 : startWriting Foo4 -> Foo4 : send NIO Foo4 -> Foo5 : handleData Foo5 -> Foo5 : doWriteData Foo5 -> Foo3 : write Foo3 -> Foo3 : save Foo1 -> Foo3 : read ``` My approach is not to send the 'quit' command. I just think that it should be considered whether there is a way to develop some externally customizable encoding methods, so that information not read from the network buffer can continue to be read out. Thanks for your patient response and attention. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org