vps console: restore tty settings on exit properly