Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js: Hooking repl to a remote node server

Let's say I have a node server running at mysite.com. Is there a way to set up that server so that I can use node's repl api to securely connect to it from my local machine?

like image 244
soundly_typed Avatar asked Feb 15 '12 22:02

soundly_typed


1 Answers

Well, if you used this example:

net.createServer(function (socket) {
  repl.start("node via TCP socket> ", socket);
}).listen(5001, "localhost");

And firewalled that port 5001, you should be able to securely connect to it using ssh:

ssh user@host nc localhost 5001

In this case, the security relies on your firewall, and ssh.

like image 115
Linus Thiel Avatar answered Oct 21 '22 09:10

Linus Thiel