This worked previously when I did still have a shell, after using the 'exit' command it would hang (and I could not make it exit in any way) until Firefox was closed. Closing Firefox, to terminate any remaining proxy connections.Typing the above but with a space after the tilde, because dead keys are on for my keyboard layout.This question is not a duplicate because the other question asks how to do it on Linux (see the tags) and this is about how to do it from Windows (PowerShell in particular). Profpatsch: unless, of course, you use IGNOREEOF (in bash) because you also use a terminal multiplexer and got tired of sometimes mistyping. I saw this other question, How do I exit an SSH connection?, but none of the answers work. Simply hit Ctrl+D twice instead of Alt-F4 or Ctrl-Q, this sends the exit signal to your current ssh, then to your shell, and the terminal emulator should close automatically without shell. Ssh worked out of the box there, nothing additional was installed to my knowledge. The client is a standard Windows 10 PowerShell. The account just needs to proxy, so it has no terminal or anything. There is some danger that cu is willing to absorb certain signals without quitting, or that it will crash uncleanly (perhaps leaving the serial port in a messed-up state, or leaving log files not updated).I'm connecting to a server via SSH for the SOCKS proxying like this: If all else fails, google for hints, or read the source to cu. You may have to experiment with what signal to send (common candidates are QUIT, KILL, TERM, USR1). Open a second window to the same host, and use the kill command in the second window. But to be honest, I don't remember which signal that is, and the documentation is silent on it. Another approach is to use Ctrl + D which will send an EOF to the shell and terminate your session. You can type exit or logout to explicitly end your session. Simply closing the client should be sufficient. Option 3: I think there is a signal that you can send to cu to make it quit. There are a number of ways you can end your SSH session. Again, there aren't terribly many possible choices. That's easier, use option -e on the ssh command line. Option 2: Change the escape character that ssh uses. It may take some effort to find another rarely-used character, like backslash or vertical bar or backquote. It's the variable "escape" in the cu configuration file. Now lets check the numeric value of the interrupt. First lets see what key combination corresponds to the interrupt signal. The process exited because it received a signal 2, the interrupt signal SIGINT produced by Ctrl + C. Option 1: Change the escape character that cu uses. That message isnt one you normally see but it is quite correct. Your problem is that both cu and ssh use the same escape character, namely tilde or "~". Re: Closing cu from within an ssh session? What is the proper way to shutdown and exit out of a cu session?Īnd what is the proper way to do it from within an ssh session? I need to close down cu properly, within the original ssh session I opened it from. And if someone else tries to access the port it's busy. If I use " ~!" it drops me back into my ssh session, but the lock is still in place. Hitting the esc key a bunch of times followed by a quick " shift+~" will do it.īut, if I do it while ssh'd to host_b it closes the ssh session. Sometimes it registers a literal " ~" character, other times it registers as an escape signal. The normal way to close down cu to cuau0 is keystroke " ~." or " ~^d", the " ~" is an escape signal, followed by a command. I need to be able to shut down and exit out of the cu session on cuau0, during the ssh session I opened it from. Host_b has a serial line to a network device on /dev/cuau0įrom host_a, through my ssh session, I can use cu-> cuau0 -> network device.Įverything works as expected/intended up to this point.īut then, if I want to close down the serial connection without closing my ssh session.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |