[jira] [Created] (SSHD-1026) NOTICE file claims Copyright for future years

2020-07-01 Thread Bernhard M. Wiedemann (Jira)
Bernhard M. Wiedemann created SSHD-1026:
---

 Summary: NOTICE file claims Copyright for future years
 Key: SSHD-1026
 URL: https://issues.apache.org/jira/browse/SSHD-1026
 Project: MINA SSHD
  Issue Type: Bug
Affects Versions: 2.4.0
Reporter: Bernhard M. Wiedemann


While working on the reproducible builds effort, I found that
 when building the [apache-sshd 2.4.0 
package|https://github.com/bmwiedemann/openSUSE/tree/master/packages/a/apache-sshd]
 for openSUSE Linux, there were differences between builds when the year 
changed:
  

{{/usr/share/java/apache-sshd/sshd-common.jar META-INF/NOTICE}}
 \{{ @@ -1,6 +1,6 @@}}

{{Apache MINA SSHD}}
 \{{ -Copyright 2018-2020 The Apache Software Foundation}}
 \{{ +Copyright 2018-2035 The Apache Software Foundation}}

 
 See [https://reproducible-builds.org/] for why this matters.
  
 I cannot find where that comes from - in the input I only see NOTICE.txt:
 {{Apache MINA SSHD}}
 \{{ Copyright 2008-2018 The Apache Software Foundation}}

 

Nothing should claim copyright for future years. And you probably dont want 
give up copyright on versions from before 2018 either.

 

 

In case it matters, our build currently involves these packages+versions:

{{java-11-openjdk-11.0.7.0-3.74}}
{{java-11-openjdk-devel-11.0.7.0-3.74}}
{{java-11-openjdk-headless-11.0.7.0-3.74}}
{{javamail-1.5.2-2.4}}
{{javapackages-local-5.3.0-114.6}}
{{javapackages-tools-5.3.0-114.1}}

{{maven-archiver-3.5.0-1.2}}
 {{maven-artifact-2.2.1-1.5}}
 {{maven-artifact-manager-2.2.1-1.5}}
 {{maven-artifact-resolver-1.0-2.2}}
 {{maven-artifact-transfer-0.11.0-1.2}}
 {{maven-clean-plugin-3.1.0-3.5}}
 {{maven-common-artifact-filters-3.0.1-1.5}}
 {{maven-compiler-plugin-3.8.1-2.2}}
 {{maven-dependency-analyzer-1.10-1.5}}
 {{maven-dependency-plugin-3.1.1-2.4}}
 {{maven-dependency-tree-3.0-1.5}}
 {{maven-doxia-core-1.9.1-2.2}}
 {{maven-doxia-logging-api-1.9.1-2.2}}
 {{maven-doxia-module-apt-1.9.1-2.2}}
 {{maven-doxia-module-fml-1.9.1-2.2}}
 {{maven-doxia-module-fo-1.9.1-2.2}}
 {{maven-doxia-module-xdoc-1.9.1-2.2}}
 {{maven-doxia-module-xhtml-1.9.1-2.2}}
 {{maven-doxia-module-xhtml5-1.9.1-2.2}}
 {{maven-doxia-sink-api-1.9.1-2.2}}
 {{maven-doxia-sitetools-1.9.2-1.2}}
 {{maven-file-management-3.0.0-1.5}}
 {{maven-filtering-3.1.1-1.5}}
 {{maven-invoker-3.0.1-1.3}}
 {{maven-jar-plugin-3.2.0-1.4}}
 {{maven-javadoc-plugin-3.1.1-2.2}}
 {{maven-lib-3.6.2-17.1}}
 {{maven-local-5.3.0-2.2}}
 {{maven-model-2.2.1-1.5}}
 {{maven-monitor-2.2.1-1.5}}
 {{maven-plugin-annotations-3.6.0-1.3}}
 {{maven-plugin-build-helper-1.9.1-1.7}}
 {{maven-plugin-bundle-3.5.1-18.1}}
 {{maven-plugin-registry-2.2.1-1.5}}
 {{maven-profile-2.2.1-1.5}}
 {{maven-project-2.2.1-1.5}}
 {{maven-remote-resources-plugin-1.5-4.4}}
 {{maven-reporting-api-3.0-1.5}}
 {{maven-reporting-impl-3.0.0-2.2}}
 {{maven-resolver-api-1.4.1-1.2}}
 {{maven-resolver-connector-basic-1.4.1-1.2}}
 {{maven-resolver-impl-1.4.1-1.2}}
 {{maven-resolver-spi-1.4.1-1.2}}
 {{maven-resolver-transport-wagon-1.4.1-1.2}}
 {{maven-resolver-util-1.4.1-1.2}}
 {{maven-resources-plugin-3.1.0-2.4}}
 {{maven-settings-2.2.1-1.5}}
 {{maven-shared-incremental-1.1-1.5}}
 {{maven-shared-io-3.0.0-1.5}}
 {{maven-shared-utils-3.2.1-1.5}}
 {{maven-surefire-2.22.0-3.4}}
 {{maven-surefire-plugin-2.22.0-3.4}}
 {{maven-surefire-provider-junit-2.22.0-3.4}}
 {{maven-surefire-provider-testng-2.22.0-3.4}}
 {{maven-wagon-file-3.2.0-2.2}}
 {{maven-wagon-http-3.2.0-2.2}}
 {{maven-wagon-http-shared-3.2.0-2.2}}
 {{maven-wagon-provider-api-3.2.0-2.2}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Updated] (SSHD-1026) NOTICE file claims Copyright for future years

2020-07-01 Thread Bernhard M. Wiedemann (Jira)


 [ 
https://issues.apache.org/jira/browse/SSHD-1026?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bernhard M. Wiedemann updated SSHD-1026:

Description: 
While working on the reproducible builds effort, I found that
 when building the [apache-sshd 2.4.0 
package|https://github.com/bmwiedemann/openSUSE/tree/master/packages/a/apache-sshd]
 for openSUSE Linux, there were differences between builds when the year 
changed:
  

{{/usr/share/java/apache-sshd/sshd-common.jar META-INF/NOTICE}}
{{@@ -1,6 +1,6 @@}}

{{Apache MINA SSHD}}
{{-Copyright 2018-2020 The Apache Software Foundation}}
{{+Copyright 2018-2035 The Apache Software Foundation}}

 
 See [https://reproducible-builds.org/] for why this matters.
  
 I cannot find where that comes from - in the input I only see NOTICE.txt:
 {{Apache MINA SSHD}}
{{Copyright 2008-2018 The Apache Software Foundation}}

 

Nothing should claim copyright for future years. And you probably dont want 
give up copyright on versions from before 2018 either.

 

 

In case it matters, our build currently involves these packages+versions:

{{java-11-openjdk-11.0.7.0-3.74}}
 {{java-11-openjdk-devel-11.0.7.0-3.74}}
 {{java-11-openjdk-headless-11.0.7.0-3.74}}
 {{javamail-1.5.2-2.4}}
 {{javapackages-local-5.3.0-114.6}}
 {{javapackages-tools-5.3.0-114.1}}

{{maven-archiver-3.5.0-1.2}}
 {{maven-artifact-2.2.1-1.5}}
 {{maven-artifact-manager-2.2.1-1.5}}
 {{maven-artifact-resolver-1.0-2.2}}
 {{maven-artifact-transfer-0.11.0-1.2}}
 {{maven-clean-plugin-3.1.0-3.5}}
 {{maven-common-artifact-filters-3.0.1-1.5}}
 {{maven-compiler-plugin-3.8.1-2.2}}
 {{maven-dependency-analyzer-1.10-1.5}}
 {{maven-dependency-plugin-3.1.1-2.4}}
 {{maven-dependency-tree-3.0-1.5}}
 {{maven-doxia-core-1.9.1-2.2}}
 {{maven-doxia-logging-api-1.9.1-2.2}}
 {{maven-doxia-module-apt-1.9.1-2.2}}
 {{maven-doxia-module-fml-1.9.1-2.2}}
 {{maven-doxia-module-fo-1.9.1-2.2}}
 {{maven-doxia-module-xdoc-1.9.1-2.2}}
 {{maven-doxia-module-xhtml-1.9.1-2.2}}
 {{maven-doxia-module-xhtml5-1.9.1-2.2}}
 {{maven-doxia-sink-api-1.9.1-2.2}}
 {{maven-doxia-sitetools-1.9.2-1.2}}
 {{maven-file-management-3.0.0-1.5}}
 {{maven-filtering-3.1.1-1.5}}
 {{maven-invoker-3.0.1-1.3}}
 {{maven-jar-plugin-3.2.0-1.4}}
 {{maven-javadoc-plugin-3.1.1-2.2}}
 {{maven-lib-3.6.2-17.1}}
 {{maven-local-5.3.0-2.2}}
 {{maven-model-2.2.1-1.5}}
 {{maven-monitor-2.2.1-1.5}}
 {{maven-plugin-annotations-3.6.0-1.3}}
 {{maven-plugin-build-helper-1.9.1-1.7}}
 {{maven-plugin-bundle-3.5.1-18.1}}
 {{maven-plugin-registry-2.2.1-1.5}}
 {{maven-profile-2.2.1-1.5}}
 {{maven-project-2.2.1-1.5}}
 {{maven-remote-resources-plugin-1.5-4.4}}
 {{maven-reporting-api-3.0-1.5}}
 {{maven-reporting-impl-3.0.0-2.2}}
 {{maven-resolver-api-1.4.1-1.2}}
 {{maven-resolver-connector-basic-1.4.1-1.2}}
 {{maven-resolver-impl-1.4.1-1.2}}
 {{maven-resolver-spi-1.4.1-1.2}}
 {{maven-resolver-transport-wagon-1.4.1-1.2}}
 {{maven-resolver-util-1.4.1-1.2}}
 {{maven-resources-plugin-3.1.0-2.4}}
 {{maven-settings-2.2.1-1.5}}
 {{maven-shared-incremental-1.1-1.5}}
 {{maven-shared-io-3.0.0-1.5}}
 {{maven-shared-utils-3.2.1-1.5}}
 {{maven-surefire-2.22.0-3.4}}
 {{maven-surefire-plugin-2.22.0-3.4}}
 {{maven-surefire-provider-junit-2.22.0-3.4}}
 {{maven-surefire-provider-testng-2.22.0-3.4}}
 {{maven-wagon-file-3.2.0-2.2}}
 {{maven-wagon-http-3.2.0-2.2}}
 {{maven-wagon-http-shared-3.2.0-2.2}}
 {{maven-wagon-provider-api-3.2.0-2.2}}

  was:
While working on the reproducible builds effort, I found that
 when building the [apache-sshd 2.4.0 
package|https://github.com/bmwiedemann/openSUSE/tree/master/packages/a/apache-sshd]
 for openSUSE Linux, there were differences between builds when the year 
changed:
  

{{/usr/share/java/apache-sshd/sshd-common.jar META-INF/NOTICE}}
 \{{ @@ -1,6 +1,6 @@}}

{{Apache MINA SSHD}}
 \{{ -Copyright 2018-2020 The Apache Software Foundation}}
 \{{ +Copyright 2018-2035 The Apache Software Foundation}}

 
 See [https://reproducible-builds.org/] for why this matters.
  
 I cannot find where that comes from - in the input I only see NOTICE.txt:
 {{Apache MINA SSHD}}
 \{{ Copyright 2008-2018 The Apache Software Foundation}}

 

Nothing should claim copyright for future years. And you probably dont want 
give up copyright on versions from before 2018 either.

 

 

In case it matters, our build currently involves these packages+versions:

{{java-11-openjdk-11.0.7.0-3.74}}
{{java-11-openjdk-devel-11.0.7.0-3.74}}
{{java-11-openjdk-headless-11.0.7.0-3.74}}
{{javamail-1.5.2-2.4}}
{{javapackages-local-5.3.0-114.6}}
{{javapackages-tools-5.3.0-114.1}}

{{maven-archiver-3.5.0-1.2}}
 {{maven-artifact-2.2.1-1.5}}
 {{maven-artifact-manager-2.2.1-1.5}}
 {{maven-artifact-resolver-1.0-2.2}}
 {{maven-artifact-transfer-0.11.0-1.2}}
 {{maven-clean-plugin-3.1.0-3.5}}
 {{maven-common-artifact-filters-3.0.1-1.5}}
 {{maven-compiler-plugin-3.8.1-2.2}}
 {{maven-dependency-analyzer-1.10-1.5}}
 {{maven-dependency-plugin-3.1.1-2.4}}
 

[jira] [Commented] (SSHD-1022) NPE in SftpOutputStreamAsync.flush()

2020-07-01 Thread David Ostrovsky (Jira)


[ 
https://issues.apache.org/jira/browse/SSHD-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17149433#comment-17149433
 ] 

David Ostrovsky commented on SSHD-1022:
---

Thanks for the quick patch release 2.5.1.

 

In Gerrit Code Review project we are waiting for new release to replace JCraft 
JSch library with SSHD client.

> NPE in SftpOutputStreamAsync.flush() 
> -
>
> Key: SSHD-1022
> URL: https://issues.apache.org/jira/browse/SSHD-1022
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 2.5.0
>Reporter: Thomas Wolf
>Assignee: Lyor Goldstein
>Priority: Major
> Fix For: 2.5.1
>
>
> {{SftpOutputStreamAsync.flush()}} sets the internal buffer to {{null}}. Code 
> invoking {{flush()}} without having written anything since the last flush 
> will get an NPE.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Comment Edited] (SSHD-1022) NPE in SftpOutputStreamAsync.flush()

2020-07-01 Thread David Ostrovsky (Jira)


[ 
https://issues.apache.org/jira/browse/SSHD-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17149433#comment-17149433
 ] 

David Ostrovsky edited comment on SSHD-1022 at 7/1/20, 1:23 PM:


Thanks for the quick patch release 2.5.1.

In Gerrit Code Review project we are waiting for new release to replace JCraft 
JSch library with SSHD client.


was (Author: davido2):
Thanks for the quick patch release 2.5.1.

 

In Gerrit Code Review project we are waiting for new release to replace JCraft 
JSch library with SSHD client.

> NPE in SftpOutputStreamAsync.flush() 
> -
>
> Key: SSHD-1022
> URL: https://issues.apache.org/jira/browse/SSHD-1022
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 2.5.0
>Reporter: Thomas Wolf
>Assignee: Lyor Goldstein
>Priority: Major
> Fix For: 2.5.1
>
>
> {{SftpOutputStreamAsync.flush()}} sets the internal buffer to {{null}}. Code 
> invoking {{flush()}} without having written anything since the last flush 
> will get an NPE.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Created] (SSHD-1027) The terminal input is also getting captured along with output in channelShell

2020-07-01 Thread vikash (Jira)
vikash created SSHD-1027:


 Summary: The terminal input is also getting captured along with 
output in channelShell
 Key: SSHD-1027
 URL: https://issues.apache.org/jira/browse/SSHD-1027
 Project: MINA SSHD
  Issue Type: Bug
Reporter: vikash






--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Resolved] (SSHD-1027) The terminal input is also getting captured along with output in channelShell

2020-07-01 Thread Lyor Goldstein (Jira)


 [ 
https://issues.apache.org/jira/browse/SSHD-1027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lyor Goldstein resolved SSHD-1027.
--
Resolution: Won't Fix

This is not new - seems like yet another manifestation of SSHD-592. 
Unfortunately, after having investigated it I did not find a generic solution. 
Seems like it depends on the actual server that is running the shell. I am 
afraid the only option is to somehow detect whether the server echo-es the 
command/result and compensate for it in your code. From past experience - it is 
not a simple task

> The terminal input is also getting captured along with output in channelShell
> -
>
> Key: SSHD-1027
> URL: https://issues.apache.org/jira/browse/SSHD-1027
> Project: MINA SSHD
>  Issue Type: Bug
>Reporter: vikash
>Priority: Major
>
> I am opening a ChannelShell and executing a command "show" in the terminal as 
> below.
> so if you notice the (Root)show is also getting captured along with (Root) at 
> last.when i run the same manually the actual output of "show" command is the 
> Expected output as shown below.
> what i am getting as output:
> (Root) show
>  +-- Containers
>  +-- device-manager
>  +-- modules-state
>  +-- netconf
>  +-- netconf-state
>  +-- platform
>  +-- restconf-state
>  +-- schema-mounts
>  +-- xpon-tc-allocation
>  (Root)
>  
>  
>  
> Expected output:
> +-- Containers
>  +-- device-manager
>  +-- modules-state
>  +-- netconf
>  +-- netconf-state
>  +-- platform
>  +-- restconf-state
>  +-- schema-mounts
>  +-- xpon-tc-allocation
> code:
>  
> client = SshClient.setUpDefaultClient();
>  client.start();
>  session = client.connect(serverUsername, serverIp, 
> Integer.parseInt(serverPort)).verify().getSession();
>  session.addPasswordIdentity(serverPassword);
>  session.auth().verify(TimeUnit.SECONDS.toMillis(50L)).isSuccess();
>  channel = session.createShellChannel();
> PipedOutputStream pipedIn = new PipedOutputStream();
>  InputStream inPipe = new PipedInputStream(pipedIn);
>  ByteArrayOutputStream out = new ByteArrayOutputStream();
>  ByteArrayOutputStream err = new ByteArrayOutputStream();
>  channel.setIn(inPipe);
>  channel.setOut(out);
>  channel.setErr(err);
>  channel.open();
> pipedIn.write(("show" + "\n").getBytes(StandardCharsets.UTF_8));
>  pipedIn.flush();
>  channel.waitFor(EnumSet.of(ClientChannelEvent.EXIT_SIGNAL), 2 * 1000L);
>  List output = Arrays.asList(new 
> String(out.toByteArray()).split("\r\n"));
>  
> please let me know if i need set the PytMode or any configuration from client 
> , that i may be missing.
>  
> I am using sshd-core 2.4.0



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Updated] (SSHD-1027) The terminal input is also getting captured along with output in channelShell

2020-07-01 Thread vikash (Jira)


 [ 
https://issues.apache.org/jira/browse/SSHD-1027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

vikash updated SSHD-1027:
-
Description: 
I am opening a ChannelShell and executing a command "show" in the terminal as 
below.

so if you notice the (Root)show is also getting captured along with (Root) at 
last.when i run the same manually the actual output of "show" command is the 
Expected output as shown below.

what i am getting as output:

(Root) show
+-- Containers
 +-- device-manager
 +-- modules-state
 +-- netconf
 +-- netconf-state
 +-- platform
 +-- restconf-state
 +-- schema-mounts
 +-- xpon-tc-allocation
(Root)

 

 

 

Expected output:

+-- Containers
 +-- device-manager
 +-- modules-state
 +-- netconf
 +-- netconf-state
 +-- platform
 +-- restconf-state
 +-- schema-mounts
 +-- xpon-tc-allocation



code:

 

client = SshClient.setUpDefaultClient();
 client.start();
session = client.connect(serverUsername, serverIp, 
Integer.parseInt(serverPort)).verify().getSession();
 session.addPasswordIdentity(serverPassword);
 session.auth().verify(TimeUnit.SECONDS.toMillis(50L)).isSuccess();
 channel = session.createShellChannel();

PipedOutputStream pipedIn = new PipedOutputStream();
 InputStream inPipe = new PipedInputStream(pipedIn);
 ByteArrayOutputStream out = new ByteArrayOutputStream();
 ByteArrayOutputStream err = new ByteArrayOutputStream();
 channel.setIn(inPipe);
 channel.setOut(out);
 channel.setErr(err);
 channel.open();

pipedIn.write(("show" + "\n").getBytes(StandardCharsets.UTF_8));
 pipedIn.flush();
 channel.waitFor(EnumSet.of(ClientChannelEvent.EXIT_SIGNAL), 2 * 1000L);
 List output = Arrays.asList(new 
String(out.toByteArray()).split("\r\n"));

 

please let me know if i need set the PytMode or any configuration from client , 
that i may be missing.

> The terminal input is also getting captured along with output in channelShell
> -
>
> Key: SSHD-1027
> URL: https://issues.apache.org/jira/browse/SSHD-1027
> Project: MINA SSHD
>  Issue Type: Bug
>Reporter: vikash
>Priority: Major
>
> I am opening a ChannelShell and executing a command "show" in the terminal as 
> below.
> so if you notice the (Root)show is also getting captured along with (Root) at 
> last.when i run the same manually the actual output of "show" command is the 
> Expected output as shown below.
> what i am getting as output:
> (Root) show
> +-- Containers
>  +-- device-manager
>  +-- modules-state
>  +-- netconf
>  +-- netconf-state
>  +-- platform
>  +-- restconf-state
>  +-- schema-mounts
>  +-- xpon-tc-allocation
> (Root)
>  
>  
>  
> Expected output:
> +-- Containers
>  +-- device-manager
>  +-- modules-state
>  +-- netconf
>  +-- netconf-state
>  +-- platform
>  +-- restconf-state
>  +-- schema-mounts
>  +-- xpon-tc-allocation
> code:
>  
> client = SshClient.setUpDefaultClient();
>  client.start();
> session = client.connect(serverUsername, serverIp, 
> Integer.parseInt(serverPort)).verify().getSession();
>  session.addPasswordIdentity(serverPassword);
>  session.auth().verify(TimeUnit.SECONDS.toMillis(50L)).isSuccess();
>  channel = session.createShellChannel();
> PipedOutputStream pipedIn = new PipedOutputStream();
>  InputStream inPipe = new PipedInputStream(pipedIn);
>  ByteArrayOutputStream out = new ByteArrayOutputStream();
>  ByteArrayOutputStream err = new ByteArrayOutputStream();
>  channel.setIn(inPipe);
>  channel.setOut(out);
>  channel.setErr(err);
>  channel.open();
> pipedIn.write(("show" + "\n").getBytes(StandardCharsets.UTF_8));
>  pipedIn.flush();
>  channel.waitFor(EnumSet.of(ClientChannelEvent.EXIT_SIGNAL), 2 * 1000L);
>  List output = Arrays.asList(new 
> String(out.toByteArray()).split("\r\n"));
>  
> please let me know if i need set the PytMode or any configuration from client 
> , that i may be missing.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Updated] (SSHD-1027) The terminal input is also getting captured along with output in channelShell

2020-07-01 Thread vikash (Jira)


 [ 
https://issues.apache.org/jira/browse/SSHD-1027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

vikash updated SSHD-1027:
-
Description: 

I am opening a ChannelShell and executing a command "show" in the terminal as 
below.

so if you notice the (Root)show is also getting captured along with (Root) at 
last.when i run the same manually the actual output of "show" command is the 
Expected output as shown below.

what i am getting as output:

(Root) show
+-- Containers
 +-- device-manager
 +-- modules-state
 +-- netconf
 +-- netconf-state
 +-- platform
 +-- restconf-state
 +-- schema-mounts
 +-- xpon-tc-allocation
(Root)

 

 

 

Expected output:

+-- Containers
 +-- device-manager
 +-- modules-state
 +-- netconf
 +-- netconf-state
 +-- platform
 +-- restconf-state
 +-- schema-mounts
 +-- xpon-tc-allocation



code:

 

client = SshClient.setUpDefaultClient();
 client.start();
session = client.connect(serverUsername, serverIp, 
Integer.parseInt(serverPort)).verify().getSession();
 session.addPasswordIdentity(serverPassword);
 session.auth().verify(TimeUnit.SECONDS.toMillis(50L)).isSuccess();
 channel = session.createShellChannel();

PipedOutputStream pipedIn = new PipedOutputStream();
 InputStream inPipe = new PipedInputStream(pipedIn);
 ByteArrayOutputStream out = new ByteArrayOutputStream();
 ByteArrayOutputStream err = new ByteArrayOutputStream();
 channel.setIn(inPipe);
 channel.setOut(out);
 channel.setErr(err);
 channel.open();

pipedIn.write(("show" + "\n").getBytes(StandardCharsets.UTF_8));
 pipedIn.flush();
 channel.waitFor(EnumSet.of(ClientChannelEvent.EXIT_SIGNAL), 2 * 1000L);
 List output = Arrays.asList(new 
String(out.toByteArray()).split("\r\n"));

 

please let me know if i need set the PytMode or any configuration from client , 
that i may be missing.

  was:
I am opening a ChannelShell and executing a command "show" in the terminal as 
below.

so if you notice the (Root)show is also getting captured along with (Root) at 
last.when i run the same manually the actual output of "show" command is the 
Expected output as shown below.

what i am getting as output:

(Root) show
+-- Containers
 +-- device-manager
 +-- modules-state
 +-- netconf
 +-- netconf-state
 +-- platform
 +-- restconf-state
 +-- schema-mounts
 +-- xpon-tc-allocation
(Root)

 

 

 

Expected output:

+-- Containers
 +-- device-manager
 +-- modules-state
 +-- netconf
 +-- netconf-state
 +-- platform
 +-- restconf-state
 +-- schema-mounts
 +-- xpon-tc-allocation



code:

 

client = SshClient.setUpDefaultClient();
 client.start();
session = client.connect(serverUsername, serverIp, 
Integer.parseInt(serverPort)).verify().getSession();
 session.addPasswordIdentity(serverPassword);
 session.auth().verify(TimeUnit.SECONDS.toMillis(50L)).isSuccess();
 channel = session.createShellChannel();

PipedOutputStream pipedIn = new PipedOutputStream();
 InputStream inPipe = new PipedInputStream(pipedIn);
 ByteArrayOutputStream out = new ByteArrayOutputStream();
 ByteArrayOutputStream err = new ByteArrayOutputStream();
 channel.setIn(inPipe);
 channel.setOut(out);
 channel.setErr(err);
 channel.open();

pipedIn.write(("show" + "\n").getBytes(StandardCharsets.UTF_8));
 pipedIn.flush();
 channel.waitFor(EnumSet.of(ClientChannelEvent.EXIT_SIGNAL), 2 * 1000L);
 List output = Arrays.asList(new 
String(out.toByteArray()).split("\r\n"));

 

please let me know if i need set the PytMode or any configuration from client , 
that i may be missing.


> The terminal input is also getting captured along with output in channelShell
> -
>
> Key: SSHD-1027
> URL: https://issues.apache.org/jira/browse/SSHD-1027
> Project: MINA SSHD
>  Issue Type: Bug
>Reporter: vikash
>Priority: Major
>
> I am opening a ChannelShell and executing a command "show" in the terminal as 
> below.
> so if you notice the (Root)show is also getting captured along with (Root) at 
> last.when i run the same manually the actual output of "show" command is the 
> Expected output as shown below.
> what i am getting as output:
> (Root) show
> +-- Containers
>  +-- device-manager
>  +-- modules-state
>  +-- netconf
>  +-- netconf-state
>  +-- platform
>  +-- restconf-state
>  +-- schema-mounts
>  +-- xpon-tc-allocation
> (Root)
>  
>  
>  
> Expected output:
> +-- Containers
>  +-- device-manager
>  +-- modules-state
>  +-- netconf
>  +-- netconf-state
>  +-- platform
>  +-- restconf-state
>  +-- schema-mounts
>  +-- xpon-tc-allocation
> code:
>  
> client = SshClient.setUpDefaultClient();
>  client.start();
> session = client.connect(serverUsername, serverIp, 
> Integer.parseInt(serverPort)).verify().getSession();
>  session.addPasswordIdentity(serverPassword);
>  session.auth().verify(TimeUnit.SECONDS.toMillis(50L)).isSuccess();
>  channel = session.createShellChannel();
> 

[jira] [Updated] (SSHD-1027) The terminal input is also getting captured along with output in channelShell

2020-07-01 Thread vikash (Jira)


 [ 
https://issues.apache.org/jira/browse/SSHD-1027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

vikash updated SSHD-1027:
-
Description: 
I am opening a ChannelShell and executing a command "show" in the terminal as 
below.

so if you notice the (Root)show is also getting captured along with (Root) at 
last.when i run the same manually the actual output of "show" command is the 
Expected output as shown below.

what i am getting as output:

(Root) show
 +-- Containers
 +-- device-manager
 +-- modules-state
 +-- netconf
 +-- netconf-state
 +-- platform
 +-- restconf-state
 +-- schema-mounts
 +-- xpon-tc-allocation
 (Root)

 

 

 

Expected output:

+-- Containers
 +-- device-manager
 +-- modules-state
 +-- netconf
 +-- netconf-state
 +-- platform
 +-- restconf-state
 +-- schema-mounts
 +-- xpon-tc-allocation

code:

 

client = SshClient.setUpDefaultClient();
 client.start();
 session = client.connect(serverUsername, serverIp, 
Integer.parseInt(serverPort)).verify().getSession();
 session.addPasswordIdentity(serverPassword);
 session.auth().verify(TimeUnit.SECONDS.toMillis(50L)).isSuccess();
 channel = session.createShellChannel();

PipedOutputStream pipedIn = new PipedOutputStream();
 InputStream inPipe = new PipedInputStream(pipedIn);
 ByteArrayOutputStream out = new ByteArrayOutputStream();
 ByteArrayOutputStream err = new ByteArrayOutputStream();
 channel.setIn(inPipe);
 channel.setOut(out);
 channel.setErr(err);
 channel.open();

pipedIn.write(("show" + "\n").getBytes(StandardCharsets.UTF_8));
 pipedIn.flush();
 channel.waitFor(EnumSet.of(ClientChannelEvent.EXIT_SIGNAL), 2 * 1000L);
 List output = Arrays.asList(new 
String(out.toByteArray()).split("\r\n"));

 

please let me know if i need set the PytMode or any configuration from client , 
that i may be missing.

 

I am using sshd-core 2.4.0

  was:

I am opening a ChannelShell and executing a command "show" in the terminal as 
below.

so if you notice the (Root)show is also getting captured along with (Root) at 
last.when i run the same manually the actual output of "show" command is the 
Expected output as shown below.

what i am getting as output:

(Root) show
+-- Containers
 +-- device-manager
 +-- modules-state
 +-- netconf
 +-- netconf-state
 +-- platform
 +-- restconf-state
 +-- schema-mounts
 +-- xpon-tc-allocation
(Root)

 

 

 

Expected output:

+-- Containers
 +-- device-manager
 +-- modules-state
 +-- netconf
 +-- netconf-state
 +-- platform
 +-- restconf-state
 +-- schema-mounts
 +-- xpon-tc-allocation



code:

 

client = SshClient.setUpDefaultClient();
 client.start();
session = client.connect(serverUsername, serverIp, 
Integer.parseInt(serverPort)).verify().getSession();
 session.addPasswordIdentity(serverPassword);
 session.auth().verify(TimeUnit.SECONDS.toMillis(50L)).isSuccess();
 channel = session.createShellChannel();

PipedOutputStream pipedIn = new PipedOutputStream();
 InputStream inPipe = new PipedInputStream(pipedIn);
 ByteArrayOutputStream out = new ByteArrayOutputStream();
 ByteArrayOutputStream err = new ByteArrayOutputStream();
 channel.setIn(inPipe);
 channel.setOut(out);
 channel.setErr(err);
 channel.open();

pipedIn.write(("show" + "\n").getBytes(StandardCharsets.UTF_8));
 pipedIn.flush();
 channel.waitFor(EnumSet.of(ClientChannelEvent.EXIT_SIGNAL), 2 * 1000L);
 List output = Arrays.asList(new 
String(out.toByteArray()).split("\r\n"));

 

please let me know if i need set the PytMode or any configuration from client , 
that i may be missing.


> The terminal input is also getting captured along with output in channelShell
> -
>
> Key: SSHD-1027
> URL: https://issues.apache.org/jira/browse/SSHD-1027
> Project: MINA SSHD
>  Issue Type: Bug
>Reporter: vikash
>Priority: Major
>
> I am opening a ChannelShell and executing a command "show" in the terminal as 
> below.
> so if you notice the (Root)show is also getting captured along with (Root) at 
> last.when i run the same manually the actual output of "show" command is the 
> Expected output as shown below.
> what i am getting as output:
> (Root) show
>  +-- Containers
>  +-- device-manager
>  +-- modules-state
>  +-- netconf
>  +-- netconf-state
>  +-- platform
>  +-- restconf-state
>  +-- schema-mounts
>  +-- xpon-tc-allocation
>  (Root)
>  
>  
>  
> Expected output:
> +-- Containers
>  +-- device-manager
>  +-- modules-state
>  +-- netconf
>  +-- netconf-state
>  +-- platform
>  +-- restconf-state
>  +-- schema-mounts
>  +-- xpon-tc-allocation
> code:
>  
> client = SshClient.setUpDefaultClient();
>  client.start();
>  session = client.connect(serverUsername, serverIp, 
> Integer.parseInt(serverPort)).verify().getSession();
>  session.addPasswordIdentity(serverPassword);
>  session.auth().verify(TimeUnit.SECONDS.toMillis(50L)).isSuccess();
>  channel = 

[RESULT] [VOTE] Release Apache Mina SSHD 2.5.1

2020-07-01 Thread Guillaume Nodet
Closing the vote with 3 +1s.
I'll upload the release asap.

Le ven. 26 juin 2020 à 11:16, Guillaume Nodet  a écrit :

> I've staged a release candidate:
>   * Maven Repo:
> https://repository.apache.org/content/repositories/orgapachemina-1050
>   * Distributions: https://dist.apache.org/repos/dist/dev/mina/sshd/2.5.1/
>   * Git Tag: https://github.com/apache/mina-sshd/releases/tag/sshd-2.5.1
>
> This release is a bug fix release for SSHD-1022
> .
>
> Please review and vote !
>
> --
> 
> Guillaume Nodet
>
>

-- 

Guillaume Nodet


[ANNOUNCE] Apache SSHD 2.5.1 released

2020-07-01 Thread Guillaume Nodet
The Apache Mina team is pleased to announce the release of SSHD 2.5.1
version.

Apache SSHD is a 100% pure java library to support the SSH protocols on
both the client and server side. This library can leverage NIO2, Apache
MINA and
also Netty - scalable and high performance asynchronous IO libraries. SSHD
does not really aim at being a replacement for the SSH client or SSH server
from Unix operating systems, but rather provides support for Java based
applications requiring SSH support.

This version is a bug fix release for this issue:

   - [SSHD-1022 ] - NPE in
   SftpOutputStreamAsync.flush()


The distributions are available from the Apache Software Foundation
distribution mirrors http://mina.apache.org/sshd-project/downloads.html and
from maven central.

On behalf of the Apache Mina team,
Guillaume Nodet


[jira] [Created] (SSHD-1028) SSH_MSG_DISCONNECT: 12 "Too many concurrent connections (64) - max. allowed: 64"

2020-07-01 Thread David Ostrovsky (Jira)
David Ostrovsky created SSHD-1028:
-

 Summary: SSH_MSG_DISCONNECT: 12 "Too many concurrent connections 
(64) - max. allowed: 64"
 Key: SSHD-1028
 URL: https://issues.apache.org/jira/browse/SSHD-1028
 Project: MINA SSHD
  Issue Type: New Feature
Affects Versions: 2.5.0
 Environment: bazel test 
//javatests/com/google/gerrit/acceptance/git:SshPushForReviewIT
Reporter: David Ostrovsky


I'm trying to migrate Gerrit to 2.5.0 and seeing this exception:


{code}
80) 
pushCommitsWithSameTreeNoChanges(com.google.gerrit.acceptance.git.SshPushForReviewIT)
com.jcraft.jsch.JSchException: SSH_MSG_DISCONNECT: 12 Too many concurrent 
connections (64) - max. allowed: 64 
at com.jcraft.jsch.Session.read(Session.java:1004)
at com.jcraft.jsch.UserAuthPublicKey.start(UserAuthPublicKey.java:198)
at com.jcraft.jsch.Session.connect(Session.java:470)
at com.jcraft.jsch.Session.connect(Session.java:183)
at 
com.google.gerrit.acceptance.SshSession.getSession(SshSession.java:111)
at com.google.gerrit.acceptance.SshSession.open(SshSession.java:46)
at 
com.google.gerrit.acceptance.AbstractDaemonTest.initSsh(AbstractDaemonTest.java:541)
at 
com.google.gerrit.acceptance.AbstractDaemonTest.beforeTest(AbstractDaemonTest.java:456)
at 
com.google.gerrit.acceptance.AbstractDaemonTest$1$1.evaluate(AbstractDaemonTest.java:230)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at 
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at 
com.google.testing.junit.runner.internal.junit4.CancellableRequestFactory$CancellableRunner.run(CancellableRequestFactory.java:108)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at 
com.google.testing.junit.runner.junit4.JUnit4Runner.run(JUnit4Runner.java:116)
at 
com.google.testing.junit.runner.BazelTestRunner.runTestsInSuite(BazelTestRunner.java:159)
at 
com.google.testing.junit.runner.BazelTestRunner.main(BazelTestRunner.java:85)
{code}

Reproducer is here: [1].

[1] https://gerrit-review.googlesource.com/c/gerrit/+/274055




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Updated] (SSHD-1028) SSH_MSG_DISCONNECT: 12 "Too many concurrent connections (64) - max. allowed: 64"

2020-07-01 Thread David Ostrovsky (Jira)


 [ 
https://issues.apache.org/jira/browse/SSHD-1028?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Ostrovsky updated SSHD-1028:
--
Issue Type: Bug  (was: New Feature)

> SSH_MSG_DISCONNECT: 12 "Too many concurrent connections (64) - max. allowed: 
> 64"
> 
>
> Key: SSHD-1028
> URL: https://issues.apache.org/jira/browse/SSHD-1028
> Project: MINA SSHD
>  Issue Type: Bug
>Affects Versions: 2.5.0
> Environment: bazel test 
> //javatests/com/google/gerrit/acceptance/git:SshPushForReviewIT
>Reporter: David Ostrovsky
>Priority: Major
>
> I'm trying to migrate Gerrit to 2.5.0 and seeing this exception:
> {code}
> 80) 
> pushCommitsWithSameTreeNoChanges(com.google.gerrit.acceptance.git.SshPushForReviewIT)
> com.jcraft.jsch.JSchException: SSH_MSG_DISCONNECT: 12 Too many concurrent 
> connections (64) - max. allowed: 64 
>   at com.jcraft.jsch.Session.read(Session.java:1004)
>   at com.jcraft.jsch.UserAuthPublicKey.start(UserAuthPublicKey.java:198)
>   at com.jcraft.jsch.Session.connect(Session.java:470)
>   at com.jcraft.jsch.Session.connect(Session.java:183)
>   at 
> com.google.gerrit.acceptance.SshSession.getSession(SshSession.java:111)
>   at com.google.gerrit.acceptance.SshSession.open(SshSession.java:46)
>   at 
> com.google.gerrit.acceptance.AbstractDaemonTest.initSsh(AbstractDaemonTest.java:541)
>   at 
> com.google.gerrit.acceptance.AbstractDaemonTest.beforeTest(AbstractDaemonTest.java:456)
>   at 
> com.google.gerrit.acceptance.AbstractDaemonTest$1$1.evaluate(AbstractDaemonTest.java:230)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>   at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>   at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>   at org.junit.runners.Suite.runChild(Suite.java:128)
>   at org.junit.runners.Suite.runChild(Suite.java:27)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at 
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>   at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:48)
>   at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>   at org.junit.runners.Suite.runChild(Suite.java:128)
>   at org.junit.runners.Suite.runChild(Suite.java:27)
>   at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>   at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>   at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>   at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>   at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>   at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>   at 
> com.google.testing.junit.runner.internal.junit4.CancellableRequestFactory$CancellableRunner.run(CancellableRequestFactory.java:108)
>   at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
>   at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
>   at 
> com.google.testing.junit.runner.junit4.JUnit4Runner.run(JUnit4Runner.java:116)
>   at 
> com.google.testing.junit.runner.BazelTestRunner.runTestsInSuite(BazelTestRunner.java:159)
>   at 
> com.google.testing.junit.runner.BazelTestRunner.main(BazelTestRunner.java:85)
> {code}
> Reproducer is here: [1].
> [1] https://gerrit-review.googlesource.com/c/gerrit/+/274055



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org

[jira] [Comment Edited] (SSHD-1027) The terminal input is also getting captured along with output in channelShell

2020-07-01 Thread vikash (Jira)


[ 
https://issues.apache.org/jira/browse/SSHD-1027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17149862#comment-17149862
 ] 

vikash edited comment on SSHD-1027 at 7/2/20, 5:05 AM:
---

Thanks!, it's not a simple task indeed it keeps on breaking depending on the 
output.

Is there any PtyMode you recommend that i can set to avoid this?

my term type is xterm-256color


was (Author: vikashks):
Thanks!, it's not a simple task indeed it keeps on breaking depending on the 
output.

Is there any PtyMode you recommend that i can set to avoid this?

> The terminal input is also getting captured along with output in channelShell
> -
>
> Key: SSHD-1027
> URL: https://issues.apache.org/jira/browse/SSHD-1027
> Project: MINA SSHD
>  Issue Type: Bug
>Reporter: vikash
>Priority: Major
>
> I am opening a ChannelShell and executing a command "show" in the terminal as 
> below.
> so if you notice the (Root)show is also getting captured along with (Root) at 
> last.when i run the same manually the actual output of "show" command is the 
> Expected output as shown below.
> what i am getting as output:
> (Root) show
>  +-- Containers
>  +-- device-manager
>  +-- modules-state
>  +-- netconf
>  +-- netconf-state
>  +-- platform
>  +-- restconf-state
>  +-- schema-mounts
>  +-- xpon-tc-allocation
>  (Root)
>  
>  
>  
> Expected output:
> +-- Containers
>  +-- device-manager
>  +-- modules-state
>  +-- netconf
>  +-- netconf-state
>  +-- platform
>  +-- restconf-state
>  +-- schema-mounts
>  +-- xpon-tc-allocation
> code:
>  
> client = SshClient.setUpDefaultClient();
>  client.start();
>  session = client.connect(serverUsername, serverIp, 
> Integer.parseInt(serverPort)).verify().getSession();
>  session.addPasswordIdentity(serverPassword);
>  session.auth().verify(TimeUnit.SECONDS.toMillis(50L)).isSuccess();
>  channel = session.createShellChannel();
> PipedOutputStream pipedIn = new PipedOutputStream();
>  InputStream inPipe = new PipedInputStream(pipedIn);
>  ByteArrayOutputStream out = new ByteArrayOutputStream();
>  ByteArrayOutputStream err = new ByteArrayOutputStream();
>  channel.setIn(inPipe);
>  channel.setOut(out);
>  channel.setErr(err);
>  channel.open();
> pipedIn.write(("show" + "\n").getBytes(StandardCharsets.UTF_8));
>  pipedIn.flush();
>  channel.waitFor(EnumSet.of(ClientChannelEvent.EXIT_SIGNAL), 2 * 1000L);
>  List output = Arrays.asList(new 
> String(out.toByteArray()).split("\r\n"));
>  
> please let me know if i need set the PytMode or any configuration from client 
> , that i may be missing.
>  
> I am using sshd-core 2.4.0



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Comment Edited] (SSHD-1027) The terminal input is also getting captured along with output in channelShell

2020-07-01 Thread vikash (Jira)


[ 
https://issues.apache.org/jira/browse/SSHD-1027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17149862#comment-17149862
 ] 

vikash edited comment on SSHD-1027 at 7/2/20, 5:04 AM:
---

Thanks!, it's not a simple task indeed it keeps on breaking depending on the 
output.

Is there any PtyMode you recommend that i can set to avoid this?


was (Author: vikashks):
Thanks!, it's not a simple task indeed it keeps on breaking depending on the 
output.

> The terminal input is also getting captured along with output in channelShell
> -
>
> Key: SSHD-1027
> URL: https://issues.apache.org/jira/browse/SSHD-1027
> Project: MINA SSHD
>  Issue Type: Bug
>Reporter: vikash
>Priority: Major
>
> I am opening a ChannelShell and executing a command "show" in the terminal as 
> below.
> so if you notice the (Root)show is also getting captured along with (Root) at 
> last.when i run the same manually the actual output of "show" command is the 
> Expected output as shown below.
> what i am getting as output:
> (Root) show
>  +-- Containers
>  +-- device-manager
>  +-- modules-state
>  +-- netconf
>  +-- netconf-state
>  +-- platform
>  +-- restconf-state
>  +-- schema-mounts
>  +-- xpon-tc-allocation
>  (Root)
>  
>  
>  
> Expected output:
> +-- Containers
>  +-- device-manager
>  +-- modules-state
>  +-- netconf
>  +-- netconf-state
>  +-- platform
>  +-- restconf-state
>  +-- schema-mounts
>  +-- xpon-tc-allocation
> code:
>  
> client = SshClient.setUpDefaultClient();
>  client.start();
>  session = client.connect(serverUsername, serverIp, 
> Integer.parseInt(serverPort)).verify().getSession();
>  session.addPasswordIdentity(serverPassword);
>  session.auth().verify(TimeUnit.SECONDS.toMillis(50L)).isSuccess();
>  channel = session.createShellChannel();
> PipedOutputStream pipedIn = new PipedOutputStream();
>  InputStream inPipe = new PipedInputStream(pipedIn);
>  ByteArrayOutputStream out = new ByteArrayOutputStream();
>  ByteArrayOutputStream err = new ByteArrayOutputStream();
>  channel.setIn(inPipe);
>  channel.setOut(out);
>  channel.setErr(err);
>  channel.open();
> pipedIn.write(("show" + "\n").getBytes(StandardCharsets.UTF_8));
>  pipedIn.flush();
>  channel.waitFor(EnumSet.of(ClientChannelEvent.EXIT_SIGNAL), 2 * 1000L);
>  List output = Arrays.asList(new 
> String(out.toByteArray()).split("\r\n"));
>  
> please let me know if i need set the PytMode or any configuration from client 
> , that i may be missing.
>  
> I am using sshd-core 2.4.0



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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



[jira] [Commented] (SSHD-1027) The terminal input is also getting captured along with output in channelShell

2020-07-01 Thread vikash (Jira)


[ 
https://issues.apache.org/jira/browse/SSHD-1027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17149862#comment-17149862
 ] 

vikash commented on SSHD-1027:
--

Thanks!, it's not a simple task indeed it keeps on breaking depending on the 
output.

> The terminal input is also getting captured along with output in channelShell
> -
>
> Key: SSHD-1027
> URL: https://issues.apache.org/jira/browse/SSHD-1027
> Project: MINA SSHD
>  Issue Type: Bug
>Reporter: vikash
>Priority: Major
>
> I am opening a ChannelShell and executing a command "show" in the terminal as 
> below.
> so if you notice the (Root)show is also getting captured along with (Root) at 
> last.when i run the same manually the actual output of "show" command is the 
> Expected output as shown below.
> what i am getting as output:
> (Root) show
>  +-- Containers
>  +-- device-manager
>  +-- modules-state
>  +-- netconf
>  +-- netconf-state
>  +-- platform
>  +-- restconf-state
>  +-- schema-mounts
>  +-- xpon-tc-allocation
>  (Root)
>  
>  
>  
> Expected output:
> +-- Containers
>  +-- device-manager
>  +-- modules-state
>  +-- netconf
>  +-- netconf-state
>  +-- platform
>  +-- restconf-state
>  +-- schema-mounts
>  +-- xpon-tc-allocation
> code:
>  
> client = SshClient.setUpDefaultClient();
>  client.start();
>  session = client.connect(serverUsername, serverIp, 
> Integer.parseInt(serverPort)).verify().getSession();
>  session.addPasswordIdentity(serverPassword);
>  session.auth().verify(TimeUnit.SECONDS.toMillis(50L)).isSuccess();
>  channel = session.createShellChannel();
> PipedOutputStream pipedIn = new PipedOutputStream();
>  InputStream inPipe = new PipedInputStream(pipedIn);
>  ByteArrayOutputStream out = new ByteArrayOutputStream();
>  ByteArrayOutputStream err = new ByteArrayOutputStream();
>  channel.setIn(inPipe);
>  channel.setOut(out);
>  channel.setErr(err);
>  channel.open();
> pipedIn.write(("show" + "\n").getBytes(StandardCharsets.UTF_8));
>  pipedIn.flush();
>  channel.waitFor(EnumSet.of(ClientChannelEvent.EXIT_SIGNAL), 2 * 1000L);
>  List output = Arrays.asList(new 
> String(out.toByteArray()).split("\r\n"));
>  
> please let me know if i need set the PytMode or any configuration from client 
> , that i may be missing.
>  
> I am using sshd-core 2.4.0



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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