private function loginWithRsaKey()
    {
        $key = new RSA();
        $password = $this->sshConfig['rsakey']['password'];
        if ($password) {
            if (!is_string($password)) {
                $password = $this->askForPassword(
                    sprintf('Password for file "%s": ', $this->sshConfig['rsakey']['file'])
                );
            }

            $key->setPassword($password);
        }

        $key->loadKey(file_get_contents($this->sshConfig['rsakey']['file']));
        if (!$this->ssh->login($this->sshConfig['username'], $key)) {
            throw new SshLoginException($this->name);
        }

        return true;
    }