babashka

Sergey Fedotov 2025-08-02T03:36:36.754109Z

Hi! I'm trying to use the bbssh pod for scripting SSH, but I've run into a problem. When I try to start a session inside a task defined in bb.edn:

(bbssh/ssh "t9" {:username "***" :identity "***" :silence-messages true})
I get the following error:
error {:ex-message "Pod quit unexpectedly", :ex-data {}}
` Interestingly, the same code works perfectly when I run it in a JVM REPL.
(bbssh/ssh "t9" {:username "***" :identity "***" :silence-messages true})
=> :com.jcraft.jsch/Session-j33qieqdq4fdbqzo
Any idea how I can troubleshoot this or find out what exactly is going wrong?

✅ 1
borkdude 2025-08-02T08:39:30.175329Z

can you test with an older version of babashka? in bb version 1.12.201 there was a change around pods which may affect pods that do something invalid with regards to the "done" status. I had to fix another pod that did this too. If you can test with an older bb to see if that's the issue, then we can file an issue against the pod and hope that @retrogradeorbit can take a look

borkdude 2025-08-02T08:44:03.361289Z

I'm not sure if that's the issue though, but maybe with some logging etc we can figure it out

borkdude 2025-08-02T10:03:08.487059Z

I think it throws because of this change: https://github.com/babashka/pods/commit/8ab7f688c265942bec0e98a4fd8b11392fd77aa7 but in the case of async ops which keep running in an infinite loop this behavior may not be desired

borkdude 2025-08-02T13:03:22.788039Z

This may fix the issue: https://github.com/babashka/pods/pull/76

borkdude 2025-08-02T13:04:56.647739Z

In 10 minutes there is a new dev build available that you could try:

bash <(curl )  --dev-build --dir /tmp

Sergey Fedotov 2025-08-02T20:29:35.506049Z

Thanks for the quick fix! It works fine with the new build.

borkdude 2025-08-02T20:29:51.464499Z

Amazing, thanks

borkdude 2025-08-02T21:26:03.631029Z

@sergey89 I made a new release: https://clojurians.slack.com/archives/C015AL9QYH1/p1754169940758599

1
borkdude 2025-08-19T07:25:57.487449Z

No I think bbssh does the right thing

Crispin 2025-08-19T09:03:19.470779Z

ok great thanks

Crispin 2025-08-19T01:52:51.453859Z

@borkdude thanks for fixing this. "which may affect pods that do something invalid with regards to the "done" status". Do I need to do something in bbssh to make it more compliant? I have long running blocking pod calls that don't tie up the main pod thread, then the pod continues to handle other messages, and the final done message may come back much later. https://github.com/epiccastle/bbssh/blob/main/src/clj/bbssh/impl/pod.clj#L216-L236