You are not logged in.

#1 2009-05-11 20:18:29

megagram
Member
Registered: 2007-12-26
Posts: 46

Reverse telnet for remote access to serial devices

Hey Guys! I've got a server with Arch running on it and a serial console cable plugged directly into a Cisco router.

I've installed the uucp package and now have the cu program installed. If I run

cu -l /dev/ttyUSB0 -s 9600

I get access to the Cisco routers console CLI and can administer everything just fine.

What I really want is to be able to access this Arch server remotely in order to administer this Cisco router via console cable.

If I SSH into the box and then run the cu command, all is well. Ideally I want to use reverse telnet so that I can just telnet to a special port (ie 2301) and be connected immediately to the console connection.

I've tried installing xinetd and setting up a configuration like this:

service console0
{
         flags           = REUSE
         socket_type     = stream
         wait            = no
         user            = root
         server          = /usr/bin/cu
         server_args     = -l /dev/ttyUSB0 -s 9600
         disable         = no
}

I've added the console0 service to /etc/services:

console0        2301/tcp

This works, except the output is pretty garbled. For instance:
- the Router's command prompt is always displayed twice
- password entry is not masked (ie it shows what you are typing)
- normal entry isn't repeated (ie a typed command does not get doubled)
- streaming output often breaks (ie listing the configuration stops prematurely)
- ctrl-a, ctrl-e etc to move the cursor does not work

Any ideas on this one? I'd appreciate any! Thanks!

Offline

Board footer

Powered by FluxBB