CLI: Telnet server

Operating Systems / OSv - Nadav Har'El [cloudius-systems.com] - 30 July 2013 03:40 UTC

This patch adds a simple telnet server to OSV, implemented in Java. One can telnet to the VM's IP address (default port 23) and get a CLI shell. Multiple concurrent telnet sessions are supported (and the shells are independent, as expected).

To start the telnet server, simply run the com.cloudius.cli.util.TelnetCLI class. For example, in the CLI to start a telnet server in the background use:

java com.cloudius.cli.util.TelnetCLI &

To start OSV with only a telnet server, try

sudo scripts/run.py -c1 -nv -m2G -e "java.so -jar /java/cli.jar java com.cloudius.cli.util.TelnetCLI"

(The "cli.jar" in the last example is only needed to set the IP address...)

In the future we can turn the telnet server on by default - but let's add a password feature first :-) Right now, there's no password requested when someone telnets in.

0b2df7d CLI: Telnet server
java/cli/com/cloudius/cli/util/TelnetCLI.java | 36 ++++
java/cli/com/cloudius/cli/util/TelnetD.java | 229 +++++++++++++++++++++++++
2 files changed, 265 insertions(+)

Upstream: github.com


  • Share