0

I am designing a distributed program using C/C++ based socket communication. Basically, I have one server program S and three client programs A, B, and C, and client programs communicate with the server program S through customized socket port. Instead of manually starting the four programs (S, A, B, and C), I want to use libssh to create ssh session(s) and send exec method to run client programs. However, I am a bit confused by the definition between ssh session and ssh channel. In my case, I would like to run ssh API on server program S to invoke these three client programs on remote hosts. Should I use one ssh session with three channels or three ssh sessions with one channel each?

Jabberwocky
  • 48,281
  • 17
  • 65
  • 115
Jes
  • 2,614
  • 4
  • 25
  • 45
  • Unless all three run on the same host, you have to use three sessions. A session is a connection. A channel is a logical stream (or set of streams) of data sent over that session. – Dark Falcon Aug 12 '15 at 14:36
  • OK I see! Thank you! – Jes Aug 12 '15 at 15:31

0 Answers0