Solved How to get out of a cu connection

Hi all, I needed to have a look at the vlan on my Cisco switch so I switched to F1 logged in as root and executed cu -l cuau0

No problem, I got my switch> prompt and did my task on the switch.

Now I can't get cu to let go of the switch and return to the root prompt.

I can execute the quit, logout or exit command to the switch and I get this message from the terminal:

switch con0 is now available
press return to get started


I've tried ctl-d, ctl-x, ctl-z but nothing happens, hitting enter gets me back to switch>

What am I missing?
 
~. at the switch> prompt results in an "unknown command" response from the switch.

once I execute logout, exit or quit from the switch> I don't get a prompt of any kind to enter anything.

At that stage the only key that seems to do anything is the enter key that puts me back into the switch.

Do I need to reboot to get cu to let go of the switch? That seems a little extreme.
 
This might be also a problem of the keyboard layout. Does your keyboard have a regular tilde key? For example my German keyboard doesn’t. Here the tilde is a dead key which is to be used for creating accented characters. In order to enter a regular tilde for leaving cu(8), I need to type the tilde char twice. Like JohnnySorocil said, I need to type an enter/return before. And finally, the full stop dot shall be entered separately, once the tilde got you to the cu prompt.
 
OK, it looks like the problem is that I can't get the escape to work.

I'm using an IBM model M keyboard and the tilde key is uppercase on the key to the left of the 1/! key in the top row.

no matter how many times I press it I don't escape.

Is there any alternate way to escape to the cu prompt?

WORKAROUND: log into F3 as root, run top, find PID of cu and kill it.
 
yes, but to change the escape character I need to get to the cu prompt and I can't get to the cu prompt because the ~ won't work as an escape character.

Do you ever have one of those days?

I think part of the problem is that when I execute quit at the switch> prompt it terminates the connection and instantly starts a new one so by the time I type ~ it's back into a connection with the switch. I'm not fast enough to type the tilde between hitting enter on my quit command and the restart.
 
Don't issue quit on the switch CLI, because you want to escape from that CLI into cu. Then once you stop cu by keying <enter>, then <tilde> and finally a <full stop>, of course cu would disconnect itself from the switch before it actually finishes.
 
OK, that works! Not the enter part, that just gives a new line with a switch> prompt but ~. works from the switch> prompt.

I was confused by not seeing the tilde, now I realize that's just a function of an escape character, it doesn't show on the CL Duh! I also thought I needed to end the session with the switch before I closed the connection but that's not true, I just need to disconnect without logging off.

It makes me wonder what the purpose of the logoff and quit commands at the switch level are for if quitting just starts a new connection and if the only way to disconnect is to leave without saying goodbye.
 
Back
Top