如何telnet到Nitrous.io框?(How to telnet to a Nitrous.io box?)

我正在运行nitrous.io框上的Node.js教程中的所有示例。 其中一个是简单的echo服务器:

var net = require('net'); var server = net.createServer(function(socket) { socket.on('data', function(data) { socket.write(data); }); }); server.listen('3000');

测试它的正确方法是在我的盒子控制台上“telnet [box name] 3000”,但它不起作用,因为telnet命令确实存在于nitrous盒子上。 我使用命令“telnet boxname.sae1.actionbox.io 3000”从我的本地终端尝试,但服务器响应http 400错误请求。

有没有办法telnet一个盒子?

I'm running all the examples from a Node.js tutorial on a nitrous.io box. One of them is a simple echo server:

var net = require('net'); var server = net.createServer(function(socket) { socket.on('data', function(data) { socket.write(data); }); }); server.listen('3000');

The right way to test it would be "telnet [box name] 3000" on my box console, but it does not work as telnet command does exist on nitrous box. I tried from my local terminal using command "telnet boxname.sae1.actionbox.io 3000" but the server responds with http 400 bad request.

Is there a way to telnet a box?

最满意答案

试试netcat ; 例如输入nc localhost 3000 。

Try netcat; e.g. type nc localhost 3000.

如何telnet到Nitrous.io框?(How to telnet to a Nitrous.io box?)

我正在运行nitrous.io框上的Node.js教程中的所有示例。 其中一个是简单的echo服务器:

var net = require('net'); var server = net.createServer(function(socket) { socket.on('data', function(data) { socket.write(data); }); }); server.listen('3000');

测试它的正确方法是在我的盒子控制台上“telnet [box name] 3000”,但它不起作用,因为telnet命令确实存在于nitrous盒子上。 我使用命令“telnet boxname.sae1.actionbox.io 3000”从我的本地终端尝试,但服务器响应http 400错误请求。

有没有办法telnet一个盒子?

I'm running all the examples from a Node.js tutorial on a nitrous.io box. One of them is a simple echo server:

var net = require('net'); var server = net.createServer(function(socket) { socket.on('data', function(data) { socket.write(data); }); }); server.listen('3000');

The right way to test it would be "telnet [box name] 3000" on my box console, but it does not work as telnet command does exist on nitrous box. I tried from my local terminal using command "telnet boxname.sae1.actionbox.io 3000" but the server responds with http 400 bad request.

Is there a way to telnet a box?

最满意答案

试试netcat ; 例如输入nc localhost 3000 。

Try netcat; e.g. type nc localhost 3000.