Hung/Orphaned telnet sessions

If you have had your reverse telnet sessions timeout, or your remote connection lost, you might have come across the following error when trying to reconnect:

IETS#sw1
Translating "sw1"
Trying R1 (172.69.1.1, 2002)...
% Connection refused by remote host

.

The happens because the sessions according to the router is still active and the inactive timeout has not yet expired. To fix this is easy, using the show line command you will see the active sessions marked with a “*”, like below:

.
shline

.

In order to reconnect, you have to release the current active/orphaned sessions. Use the clear line {line number} command referencing the output from above.
IETS#clear line 2
[confirm]
[OK]

IETS#clear line 3
[confirm]
[OK]

.

Then once all the orphaned sessions are closed, you will be able to connect again.

IETS#sw1
Translating "sw1"
Trying SW1 (172.69.1.1, 2002)... Open
SW1#

Add to FacebookAdd to NewsvineAdd to DiggAdd to Del.icio.usAdd to StumbleuponAdd to RedditAdd to BlinklistAdd to Ma.gnoliaAdd to TechnoratiAdd to Furl