Re: Closing a channel: Invalid recipient?

From: Markus Friedl (markus@openbsd.org)
Date: 12/10/02

  • Next message: Daniel.D.Olsson@telia.se: "Problem with Openssh3.5"
    Date: Tue, 10 Dec 2002 13:23:19 +0100
    From: Markus Friedl <markus@openbsd.org>
    To: Boris Shingarov <bshingar@sympatico.ca>
    
    

    On Fri, Dec 06, 2002 at 01:48:32PM -0500, Boris Shingarov wrote:
    > Hi,
    >
    > I am developing an application that talks to a server over SSH2.
    > Namely, it will execute some commands on the server. So far
    > what I do is open an SSH session, open an "exec" channel, do
    > whatever I need, then close the session.
    >
    > This works perfectly. However, I need to do several things
    > in succession; therefore I would like to open a session once,
    > and reuse it by opening and closing an exec channel for each
    > command. (Thus saving on re-authenticating every time). So
    > I open the channel with "sender" like 0, 1 and so on; the
    > server gives me back "recipient" ids again like 0, 1 and so
    > on. However, when I am done with the command and send a
    > MSG_CHANNEL_CLOSE, the server replies with MSG_DISCONNECT
    > with reason code PROTOCOL_ERROR and description: Invalid
    > channel number? What am I missing?

    make sure you use the 'recipient id' in the MSG_CHANNEL_CLOSE message



    Relevant Pages

    • Re: Explanation of macros; Haskell macros
      ... > server and I got to dictate the form of the commands and arguments. ... it boiled down to (funcall command client-session args). ... Let's assume there is a type "Session" for sessions. ... You don't need the first constraint, ...
      (comp.lang.python)
    • Re: Explanation of macros; Haskell macros
      ... > server and I got to dictate the form of the commands and arguments. ... it boiled down to (funcall command client-session args). ... Let's assume there is a type "Session" for sessions. ... You don't need the first constraint, ...
      (comp.lang.lisp)
    • Storing and Accessing email Addresses
      ... As I continue to work on an email parsing and forwarding application my ... 'Change current state of the session ... 'Send MAIL FROM command to the server ...
      (comp.lang.basic.visual.misc)
    • Re: xemacs like a server
      ... must be executed from a live xemacs session, ... The session can be started automatically, from the command line, ... I have a separate init file used only when invoking the server ... and then execute the gnuserv-start command. ...
      (comp.emacs.xemacs)
    • Re: terminal server has exeeded the maximum number of allowed conn
      ... You can also use the command rwinsta to directly end a session. ... specify IP address if the server name can't be resolved for some reason. ...
      (microsoft.public.win2000.termserv.clients)

  • Quantcast