clojuressh (and bbssh) 1.0.0 released https://github.com/epiccastle/clojuressh/releases/tag/v1.0.0
Oh thats beautiful, didn't know this library existed on the clojure side!
Reading through the How-To's: if I wanted to get a session via the equivalent of an ssh -oProxyJump=my-prox my-destination, would the recipe to do so be the following? (adapted from the auth-forwarding example)
(def proxy-session
(-> (clojuressh/ssh "my-prox")
(clojuressh/exec "ssh -oStrictHostKeyChecking=no my-destination"
{:err :string
:agent-forwarding true})))1.0.0 released with Git SHA 09999e9 is insanely cool.
@sludwig.dev yes that will connect through to my-destinationusing authentication forwarding (you must be running an ssh-agent for that) and stdin of that process will be returned in the hashmap from that for you to write to. It might me nicer to pipe a babashka.process into it and pass in your ssh connection with :session with something like:
clojure
(let [session (clojuressh/ssh "my-prox")]
(-> (babashka.process/process "echo this is run on the local machine")
(clojuressh/exec "ssh -oStrictHostKeyChecking=no my-destination od -c"
{:out :string
:err :string
:session session
:agent-forwarding true})
deref
:out
println))
Putting in some real hosts for me I get:
$ bb --config deps.edn test_jumphost.clj
0000000 t h i s i s r u n o n t
0000020 h e l o c a l m a c h i n e
0000040 \n
0000041
I would like a sqlite library which works in Clojure and Babashka. In Clojure, it should use andersmurphy/sqlite4clj . In babashka, the sqlite3 pod. I imagine this would be easy, and may already exist. Does anybody know if a library like this exists?
Kind of similar to the clojuressh / bbssh example above! a shim.