6
votes

I checked both repl from lein and clojure 1.8 socket repl, looks like none of them support username/password. if I open the repl to outside connection, how to make it safe? Or need to use ssh to login into the host and then from that host to connect to repl?

1
What do you consider not safe about ssh?Leon Grapenthin
I am not saying ssh is not safe, just need another tool (ssh) to use repl from remote machine. Daniel Compton's comment makes sense. and I will try use ssh.Daniel Wu

1 Answers

5
votes

By default, the socket REPL binds to loopback, so it will only accept connections made from that machine. That seems to be the safest method by far. Then you can use whatever auth methods you like to get onto that machine. SSH, or my personal favourite mosh are both good options.

It is plausible that you could create some kind of authentication system by providing your own REPL function, and allowing only authenticated connections from all comers, but I think that is likely to be extremely unwise and unsafe.