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