@systemd
answer is simple:

use tilde + dot to close the ssh session