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.
Cheers,
VW
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.
Cheers,
VW
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.