You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "whyDK37 (via GitHub)" <gi...@apache.org> on 2024/02/23 08:05:43 UTC

[I] InteractiveProcessShellFactory . Each character entered is repeated [mina-sshd]

whyDK37 opened a new issue, #469:
URL: https://github.com/apache/mina-sshd/issues/469

   ### Version
   
   2.12.1
   
   ### Bug description
   
   Start a service with sshd, connect to the service with iterm, and repeat each time you enter the command, including carriage return
   
   ### Actual behavior
   
   Using follow code to start one server .
   
   ```
           SshServer sshd = ServerBuilder.builder()
                   .build();
   
           sshd.setShellFactory(InteractiveProcessShellFactory.INSTANCE);
   
           SimpleGeneratorHostKeyProvider keyPairProvider = new SimpleGeneratorHostKeyProvider(Paths.get("/tmp/key"));
           keyPairProvider.setOverwriteAllowed(false);
           sshd.setKeyPairProvider(keyPairProvider);
   
           sshd.setPasswordAuthenticator(AcceptAllPasswordAuthenticator.INSTANCE);
           sshd.setFileSystemFactory(new NativeFileSystemFactory());
           sshd.setCommandFactory(ProcessShellCommandFactory.INSTANCE);
           sshd.setPort(22);
           sshd.start();
           System.out.println("sshd.isStarted() = " + sshd.isStarted());
           TimeUnit.DAYS.sleep(1);
           sshd.stop();
   ```
   
   Console log :
   ```
   15:58:02.758 [main] INFO  org.apache.sshd.common.io.DefaultIoServiceFactoryFactory [getIoServiceProvider:68] - No detected/configured IoServiceFactoryFactory using Nio2ServiceFactoryFactory
   sshd.isStarted() = true
   ```
   
   Then use Iterm to connect to ssh server.
   <img width="696" alt="image" src="https://github.com/apache/mina-sshd/assets/8213837/22c748d7-318b-42c3-820e-2e2653e9714a">
   
   
   ### Expected behavior
   
   Expect to use commands like a normal shell after connecting to the sshd service
   
   ### Relevant log output
   
   _No response_
   
   ### Other information
   
   Thanks a lot


-- 
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-unsubscribe@mina.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


Re: [I] InteractiveProcessShellFactory . Each character entered is repeated [mina-sshd]

Posted by "whyDK37 (via GitHub)" <gi...@apache.org>.
whyDK37 commented on issue #469:
URL: https://github.com/apache/mina-sshd/issues/469#issuecomment-1968010143

   Thanks for your reply.  I checked the issue and it has been there for a long time. 
   I'm just getting started with sshd and I'm going to try to figure out how to fix this.


-- 
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-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


Re: [I] InteractiveProcessShellFactory . Each character entered is repeated [mina-sshd]

Posted by "tomaswolf (via GitHub)" <gi...@apache.org>.
tomaswolf closed issue #469: InteractiveProcessShellFactory .  Each character entered is repeated
URL: https://github.com/apache/mina-sshd/issues/469


-- 
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-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org