[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Server API: How to communicate connection failures to client


Hi there,

My server implementation accepts direct-tcpip requests.

In the message CB function, after receiving a message of type
SSH_REQUEST_CHANNEL_OPEN, subtype SSH_CHANNEL_DIRECT_TCPIP, we try to
open a local socket. If this is successful, a new channel with
ssh_message_channel_request_open_reply_accept(message) is attached.

But if opening of the local socket fails, how should the message be
treated? Is there a way to signalize to the client that the connection
failed, without opening a new channel?

Or do I have to accept the request and open a channel in any case? And
then close the channel again when the local socket operation failed?

Right now I'm reading the OpenSSH server code to find out. But maybe
someone could give me the answer and tell me what libssh functions
should be used?

Thanks,
Till


Archive administrator: postmaster@lists.cynapses.org