I'm experiencing strange behavior with a Cisco UC520
router.
When I am directly connected to the router and telnet to it using this:
telnet 192.168.1.1 23
Then I get a successful login prompt:
Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.
Cisco Configuration Assistant. Version: 3.0. Fri Jan 14 11:35:39 EST 2011
User Access Verification
Username:
However, when forward the port remotely to another machine:
ssh root@another_machine -R 127.0.0.1:23:198.168.1.1:23
And then on that other machine try and connect to the router via telnet:
telnet 127.0.0.1 23
I get a different message, and immediately disconnected:
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
SSH-1.99-Cisco-1.25
Connection closed by foreign host.
This seemed really odd so I double checked to make sure I was port forwarding port 23 and not port 22. I also tried mapping the router's name in the /etc/hosts
file of the computer I forwarded ports to, so that I could do telnet RouterName 23
in case it didn't like the hostname. I also tried using a different forwarding port (10023
) which did not work.
I don't see anything in the man
page for telnet
that indicates there is a --verbose
option like ssh -v
would give, which would be my next step in debugging. I don't see any problems in any of the /var/log/
files on the machine that the ports are forwarded to.
This seems quite strange and I think what is happening is that somehow the router thinks I'm trying to make an SSH connection instead of a telnet connection.