private void EnsureSessionIsOpen() { if (Session == null) throw new SshConnectionException("Client not connected."); } }