def run_command(self, command, disconnect=False):
        """
        Runs a command on the remote shell
        """
        # Wait for the first prompt
        if self.__wait_prompt:
            self.wait_prompt()
            self.__wait_prompt = False

        # Run the command
        self._socket.send(to_bytes(command + "\n"))

        # Disconnect if required
        if disconnect:
            self.close()
            return

        # Get its result
        data = self.wait_prompt(False)
        return data.strip()