PuTTY Serial `logout` or `exit` alternative

7,939

The logout command (exit command of the top-level shell sessions runs logout) does not send any command to PuTTY to terminate the connection. The logout command terminates the connection from server-side.

Check PuTTY event log after you type exit:

2017-10-16 08:10:38 Server sent command exit status 0
2017-10-16 08:10:42 Disconnected: All channels closed

Also, if you set Close window on exit to Never in PuTTY, you will get this after typing logout:

enter image description here

Share:
7,939

Related videos on Youtube

David Refoua
Author by

David Refoua

Updated on September 18, 2022

Comments

  • David Refoua
    David Refoua over 1 year

    When using PuTTY connected to a SSH session, upon entering exit or logout command, the connection is terminated and PuTTY is disconnected.

    I'm designing an embedded ANSI/VT100 compatible terminal server, and I was wondering if there is a way to send something like a Break signal to PuTTY in order to make it disconnect and close the serial connection.

    Is this possible? Or PuTTY doesn't handle serial connections in this way?

  • David Refoua
    David Refoua over 6 years
    I tried sending 0 and 26 key codes for CTRL-Break, but it didn't work. Do you mean that it only works in SSH mode?
  • Ina Kahn
    Ina Kahn over 6 years
    From what I read in that documentation link yes, here's what it said: Break Only available in SSH-2, and only during a session. Optional extension; may not be supported by server. PuTTY requests the server's default break length.