[jira] [Commented] (SSHD-993) an additional connection is created when connect to a sshd server
[ https://issues.apache.org/jira/browse/SSHD-993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17108143#comment-17108143 ] Shengdi commented on SSHD-993: -- I checked the tcpdump, I did see ssh client initiated two connections as you said. Thanks, i will close this issue. > an additional connection is created when connect to a sshd server > - > > Key: SSHD-993 > URL: https://issues.apache.org/jira/browse/SSHD-993 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 2.1.0 >Reporter: Shengdi >Priority: Minor > > I used > SshServer sshd = SshServer.setUpDefaultServer(); to start an sshd server. > > When I connect to server with several terminals, and then I keep connect with > other terminals, then I can probably find the additional ones. This is > randomly, and most happens after multiple connecting simultaneously or very > close, then other connect will cause additional connection > Here is an example, > I connect with 5 terminals very closely, i found 5 connections with netstat, > this is correct > TCP 127.0.0.1:63862 127.0.0.1:12399 ESTABLISHED 4 > TCP 127.0.0.1:63864 127.0.0.1:12399 ESTABLISHED 42764 > TCP 127.0.0.1:63868 127.0.0.1:12399 ESTABLISHED 47036 > TCP 127.0.0.1:63874 127.0.0.1:12399 ESTABLISHED 42516 > TCP 127.0.0.1:63879 127.0.0.1:12399 ESTABLISHED 41704 > But then connect one more time, then i found two connection established this > time, > TCP 127.0.0.1:63862 127.0.0.1:12399 ESTABLISHED 4 > TCP 127.0.0.1:63864 127.0.0.1:12399 ESTABLISHED 42764 > TCP 127.0.0.1:63868 127.0.0.1:12399 ESTABLISHED 47036 > TCP 127.0.0.1:63874 127.0.0.1:12399 ESTABLISHED 42516 > TCP 127.0.0.1:63879 127.0.0.1:12399 ESTABLISHED 41704 > {color:#ff}TCP 127.0.0.1:63890 127.0.0.1:12399 ESTABLISHED 35316{color} > {color:#ff} TCP 127.0.0.1:63891 127.0.0.1:12399 ESTABLISHED 22568{color} > > Does anyone have any idea about this? how the additional connection caused? > Great Thanks > > Cheers > Shengdi > > > == > Following is my code example > == > > {code:java} > public class SSHServer { > private SshServer sshd; > public SSHServer() { > sshd = SshServer.setUpDefaultServer(); > } > public void start() throws IOException { > sshd.setHost("127.0.0.1"); > sshd.setPort(12399); > sshd.setKeyPairProvider(new MyKeyProvider()); > sshd.setShellFactory(getShellFactory()); > sshd.setPublickeyAuthenticator(new MyAuthenticator()); > sshd.getProperties().put(SshServer.IDLE_TIMEOUT, > String.valueOf(30)); > // Start SSH server > sshd.start(); > } >private Factory getShellFactory() { > return new Factory() { > @Override > public Command create() { > return new MyShell(); > } > }; > } > } > > {code} > -- 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-993) an additional connection is created when connect to a sshd server
[ https://issues.apache.org/jira/browse/SSHD-993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17108067#comment-17108067 ] Lyor Goldstein commented on SSHD-993: - In any case, I see you are using version 2.1.0 - I recommend upgrading to 2.4.0 (I don't think it has anything to do with this issue, but who knows...) > an additional connection is created when connect to a sshd server > - > > Key: SSHD-993 > URL: https://issues.apache.org/jira/browse/SSHD-993 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 2.1.0 >Reporter: Shengdi >Priority: Minor > > I used > SshServer sshd = SshServer.setUpDefaultServer(); to start an sshd server. > > When I connect to server with several terminals, and then I keep connect with > other terminals, then I can probably find the additional ones. This is > randomly, and most happens after multiple connecting simultaneously or very > close, then other connect will cause additional connection > Here is an example, > I connect with 5 terminals very closely, i found 5 connections with netstat, > this is correct > TCP 127.0.0.1:63862 127.0.0.1:12399 ESTABLISHED 4 > TCP 127.0.0.1:63864 127.0.0.1:12399 ESTABLISHED 42764 > TCP 127.0.0.1:63868 127.0.0.1:12399 ESTABLISHED 47036 > TCP 127.0.0.1:63874 127.0.0.1:12399 ESTABLISHED 42516 > TCP 127.0.0.1:63879 127.0.0.1:12399 ESTABLISHED 41704 > But then connect one more time, then i found two connection established this > time, > TCP 127.0.0.1:63862 127.0.0.1:12399 ESTABLISHED 4 > TCP 127.0.0.1:63864 127.0.0.1:12399 ESTABLISHED 42764 > TCP 127.0.0.1:63868 127.0.0.1:12399 ESTABLISHED 47036 > TCP 127.0.0.1:63874 127.0.0.1:12399 ESTABLISHED 42516 > TCP 127.0.0.1:63879 127.0.0.1:12399 ESTABLISHED 41704 > {color:#ff}TCP 127.0.0.1:63890 127.0.0.1:12399 ESTABLISHED 35316{color} > {color:#ff} TCP 127.0.0.1:63891 127.0.0.1:12399 ESTABLISHED 22568{color} > > Does anyone have any idea about this? how the additional connection caused? > Great Thanks > > Cheers > Shengdi > > > == > Following is my code example > == > > {code:java} > public class SSHServer { > private SshServer sshd; > public SSHServer() { > sshd = SshServer.setUpDefaultServer(); > } > public void start() throws IOException { > sshd.setHost("127.0.0.1"); > sshd.setPort(12399); > sshd.setKeyPairProvider(new MyKeyProvider()); > sshd.setShellFactory(getShellFactory()); > sshd.setPublickeyAuthenticator(new MyAuthenticator()); > sshd.getProperties().put(SshServer.IDLE_TIMEOUT, > String.valueOf(30)); > // Start SSH server > sshd.start(); > } >private Factory getShellFactory() { > return new Factory() { > @Override > public Command create() { > return new MyShell(); > } > }; > } > } > > {code} > -- 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-993) an additional connection is created when connect to a sshd server
[ https://issues.apache.org/jira/browse/SSHD-993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17108054#comment-17108054 ] Lyor Goldstein commented on SSHD-993: - I don't think this has anything to do with the server. The server is +passive+ - i.e., it does not initiate connection - only clients do. Therefore I am not sure how it is the "fault" of the MINA SSHD server. I believe you can confirm that if you run Wireshark or TCPDUMP to see the connection attempts. > an additional connection is created when connect to a sshd server > - > > Key: SSHD-993 > URL: https://issues.apache.org/jira/browse/SSHD-993 > Project: MINA SSHD > Issue Type: Bug >Affects Versions: 2.1.0 >Reporter: Shengdi >Priority: Minor > > I used > SshServer sshd = SshServer.setUpDefaultServer(); to start an sshd server. > > When I connect to server with several terminals, and then I keep connect with > other terminals, then I can probably find the additional ones. This is > randomly, and most happens after multiple connecting simultaneously or very > close, then other connect will cause additional connection > Here is an example, > I connect with 5 terminals very closely, i found 5 connections with netstat, > this is correct > TCP 127.0.0.1:63862 127.0.0.1:12399 ESTABLISHED 4 > TCP 127.0.0.1:63864 127.0.0.1:12399 ESTABLISHED 42764 > TCP 127.0.0.1:63868 127.0.0.1:12399 ESTABLISHED 47036 > TCP 127.0.0.1:63874 127.0.0.1:12399 ESTABLISHED 42516 > TCP 127.0.0.1:63879 127.0.0.1:12399 ESTABLISHED 41704 > But then connect one more time, then i found two connection established this > time, > TCP 127.0.0.1:63862 127.0.0.1:12399 ESTABLISHED 4 > TCP 127.0.0.1:63864 127.0.0.1:12399 ESTABLISHED 42764 > TCP 127.0.0.1:63868 127.0.0.1:12399 ESTABLISHED 47036 > TCP 127.0.0.1:63874 127.0.0.1:12399 ESTABLISHED 42516 > TCP 127.0.0.1:63879 127.0.0.1:12399 ESTABLISHED 41704 > {color:#ff}TCP 127.0.0.1:63890 127.0.0.1:12399 ESTABLISHED 35316{color} > {color:#ff} TCP 127.0.0.1:63891 127.0.0.1:12399 ESTABLISHED 22568{color} > > Does anyone have any idea about this? how the additional connection caused? > Great Thanks > > Cheers > Shengdi > > > == > Following is my code example > == > public class SSHServer { > private SshServer sshd; > public SSHServer() { > sshd = SshServer.setUpDefaultServer(); > } > public void start() throws IOException { > sshd.setHost("127.0.0.1"); > sshd.setPort(12399); > sshd.setKeyPairProvider(new MyKeyProvider()); > sshd.setShellFactory(getShellFactory()); > sshd.setPublickeyAuthenticator(new MyAuthenticator()); > sshd.getProperties().put(SshServer.IDLE_TIMEOUT, String.valueOf(30)); > // Start SSH server > sshd.start(); > } > private Factory getShellFactory() { > return new Factory() { > @Override > public Command create() { > return new MyShell(); > } > }; > } > } > -- 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