Node.js: binding to a remote node server

Say I have a node server running on mysite.com. Is there a way to configure this server so that I can node repl api safely connect to it from my local machine?

+6
source share
1 answer

Well, if you used this example:

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

And by connecting to this port 5001 , you should be able to safely connect to it using ssh:

 ssh user@host nc localhost 5001 

In this case, security depends on your firewall and ssh.

+11
source

Source: https://habr.com/ru/post/908563/


All Articles