2026/01/20

From Woozle Writes Code
Jump to navigation Jump to search
Tuesday, January 20, 2026 (#20)
Monday Tuesday Wednesday posts:prev <this> next

Fixing Execution Clades

The problem with using the ssh2 library seems to be that it isn't recursive. I can use it to connect from A to B and run stuff on B, but I can't then use it to make another connection from B to C, and run stuff on C. My most complicated use-case is currently [A]⇒(ssh)⇒[B]⇒(mysql)⇒[C], which I think can be done using ssh_tunnel() – but it seems likely that this is why I ended up generating command-lines to wrap with "ssh" for remote execution instead of just using ssh2.

All that said: since the assemblage of pieces to use for any given connection is done entirely in the config for that connection, I can implement both methodologies and then just use whichever one seems appropriate for each connection. ssh2 is *probably* a bit less janky than wrapping a command for ssh on a single line.

(Now I need to better understand what I was doing with the Plug and Socket clades...)