I just saw this trick over on Asymmetrical View. It is really, really simple to connect to a remote instance of Clojure running swank.
With emacs running on your local machine, and sshd and
swank-clojure running on the remote host (here shown as the IP 22.214.171.124), just make an SSH tunnel between the two PCs:
ssh -L4006:localhost:4005 126.96.36.199
Then, in your local instance of emacs, run
And connect to port 4006 on the local machine. Bada-bing! Test it out with:
(future (println "Hello remote instance"))
I chose to map remote port 4005 to local port 4006 because I usually already have an instance of the Clojure REPL running locally on 4005.