Hi,What is the best way to close an SSH session via a script? At the moment I am killing the ssh.exe process which IMO is a "brute force" approach, but I don't know how to send a logout or exit command to the existing session.
If you specify a command to run via ssh, ssh will terminate graciously after the execution. If you have opened a pseudo terminal session, you may try to send escape character ~. for disconnect.
About | Terms & policy | Contact
© 2023 itefix.net