how to stop ssh connection mac code example Example: close ssh connection mac [user]@[server]:~$ exit logout Connection to [IpAdress] closed