Subject: Re: Can a remote TCP/IP server get connection information from libssh2

Re: Can a remote TCP/IP server get connection information from libssh2

From: Peter Stuge <peter_at_stuge.se>
Date: Wed, 18 May 2016 23:17:57 +0000

Jeff Coffler wrote:
> direct_tcpip.c
..
> I would like the remote server .. to:
>
> 1. Determine if the connection is coming in via SSH, and
> 2. If coming in via SSH, determine the username and type of authentication
>
> It's not clear to me if this is even possible:

It's not.

> Is this sort of integration possible with libssh2?

It's not possible, but that is unrelated to libssh2 or even the SSH
protocol. It's a property of TCP/IP.

> Thanks in advance for any help!

If you need information from the sshd then you have to integrate with
the sshd. An isolated service running somewhere else, only reachable
via IP, is not integrated, and has no access to the information you want.

A subsystem on the sshd server would, but that requires installing your
subsystem program onto the sshd server, and adding your subsystem to the
sshd configuration.

//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2016-05-19