Closed vapniks closed 3 years ago
Hello,
the problem is that on disconnect!
call a Guile-SSH session frees all its resources and thus it cannot be properly reused.
But the underlying libssh session can be reused. Here's the description of ssh_disconnect
procedure from the libssh 0.9.4 documentation:
Disconnect from a session (client or server). The session can then be reused to open a new session.
So in theory it's possible to reuse libssh session, but it's not implemented in Guile-SSH sessions.
I'd recommend you to make a new session and use it instead of the disconnected one.
Artyom.
OK, thanks for the clarification
If I create a session object to connect to a dropbear server, and then connect it, disconnect it, and then try to reconnect again, it usually won't reconnect, but sometimes does. If I check netstat I see that the tcp connection is established, even though guile reports the session as disconnected, and
authenticate-server
returns'ok
, butuserauth-public-key/auto!
returns'error
. If I then create another session object with the same options, it connects fine every time. What's going on?