[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Record SSH session
[Thread Prev] | [Thread Next]
- Subject: Re: Record SSH session
- From: Jakub Jelen <jjelen@xxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Thu, 16 Mar 2023 11:04:55 +0100
- To: libssh@xxxxxxxxxx
On 3/16/23 02:53, Jose David Bravo A wrote:
Hello,Is there any way to record a SSH session, like script/replayscript functionality but using libssh?If that's not a functionality that the lib has, may you please point me in the direction of how this can be implemented, for example using ssh_client.c ?
There is no functionality for this in libssh. There are several standalone tools, for example tlog (which is nicely integrated in RHEL).
It really depends on your use case, if you want to record it on the client or on the server or if you have some pre-existing tools or formats for storing recordings.
If you are up to the client, the ssh client example is using connectors for the IO handling. To plug the recording in, I think you can create your own callbacks that would do the logging and call the default callbacks (or reimplement them as they do not look like part of the API):
https://gitlab.com/libssh/libssh-mirror/-/blob/master/examples/ssh_client.c#L206 Regards, -- Jakub Jelen Crypto Team, Security Engineering Red Hat, Inc.
Record SSH session | Jose David Bravo A <jbravo@xxxxxxxxxxxxxxxxxxxxxx> |