Closing SSH session

2 posts / 0 new
Last post
itefix
Online
Last seen: 3 min 30 sec ago
Joined: 01.05.2008 - 21:33
Closing SSH session

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

itefix
Online
Last seen: 3 min 30 sec ago
Joined: 01.05.2008 - 21:33
Re: Closing SSH 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.

Topic locked

Release news