private function loginWithPassword()
    {
        $password = $this->sshConfig['password'];
        if (!is_string($password)) {
            $password = $this->askForPassword(
                sprintf(
                    'Password for %s@%s:%s: ',
                    $this->sshConfig['username'],
                    $this->sshConfig['host'],
                    $this->sshConfig['port']
                )
            );
        }

        if (!$this->ssh->login($this->sshConfig['username'], $password)) {
            throw new SshLoginException($this->name);
        }

        return true;
    }