login about faq

I have an application can have multiple concurrent SSH connections running at the same time sending and receiving data to/from a dummy terminal on a Linux PC. The issue I'm having is when one of the connections shuts down they ALL stop receiving.

When I request a shell for each connection, do they all connect to the same dummy shell or are they separate shells? I would expect them to be separate shells.

This question is marked "community wiki".

asked Feb 27 '13 at 16:58

Scott_C68's gravatar image


If you have one instance of the SSH object where each thread has opened a shell session, then there is only one TCP/IP socket connection with the SSH server. (This is always the case: an instance of the SSH object can have at most one TCP socket connection.) However, the SSH protocol is such that you can have several logical channels on the same connection (i.e. several shell sessions). I'm not sure exactly what you mean by "connection shuts down", but if it's the TCP socket connection shutting down, then certainly all of the logical channels on that connection will also be closed.

If you have a separate instance of the SSH object for each connection, then they should be completely independent of each other.


answered Feb 27 '13 at 17:26

chilkat's gravatar image

chilkat ♦♦

I have a multiple instances and am running separate connections with one channel each per connection. When an operation is completed for any particular channel my GUI shutsdown and disconnects that connection.


answered Feb 27 '13 at 18:05

Scott_C68's gravatar image


Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Feb 27 '13 at 16:58

Seen: 2,339 times

Last updated: Feb 27 '13 at 18:05

powered by OSQA