sshpiper icon indicating copy to clipboard operation
sshpiper copied to clipboard

sshpiper requires restart after plugin adds methods

Open philz opened this issue 4 months ago • 3 comments

This is a bit niche, but I added some extra plugin handlers to my code, restarted my grpc plugin server, and was surprised that my changes weren't working. I had to restart sshpiper to pick up on my new banner. This was unintuitive!

+               NoClientAuthCallback:  p.handleNoneAuth,
+               BannerCallback:        p.handleBanner,
+               NextAuthMethodsCallback: p.handleNextAuthMethods,

philz avatar Aug 22 '25 18:08 philz

sshpiper caches the supported methods from plugins may i know why you dont want to restart sshpiper?

tg123 avatar Aug 22 '25 20:08 tg123

Restarting sshpiper kills all existing SSH connections, i assume, so I'd like to be able to deploy some changes without restarting.

In this case, my issue was simpler. I'm developing the plugin, and I didn't realize I needed to restart sshpiper, and was super confused why things weren't working.

philz avatar Aug 22 '25 21:08 philz

this is how supported methods cache works. intend to save some during plugins load and seems need a reload when plugin restarts

https://github.com/tg123/sshpiper/blob/ec4caf53aae4651f7ad3ae5d70a7b2ece8d2ed6b/cmd/sshpiperd/internal/plugin/grpc.go#L54

tg123 avatar Aug 22 '25 21:08 tg123