def verify
      res = @backend.run_command(run('echo'))
      return nil if res.exit_status == 0
      rawerr = res.stdout + ' ' + res.stderr

      {
        'Sorry, try again' => ['Wrong sudo password.', :bad_sudo_password],
        'sudo: no tty present and no askpass program specified' =>
          ['Sudo requires a password, please configure it.', :sudo_password_required],
        'sudo: command not found' =>
          ["Can't find sudo command. Please either install and "\
            'configure it on the target or deactivate sudo.', :sudo_command_not_found],
        'sudo: sorry, you must have a tty to run sudo' =>
          ['Sudo requires a TTY. Please see the README on how to configure '\
            'sudo to allow for non-interactive usage.', :sudo_no_tty],
      }.each do |sudo, human|
        rawerr = human if rawerr.include? sudo
      end

      rawerr
    end
def verify
      res = @backend.run_command(run('echo'))
      return nil if res.exit_status == 0
      rawerr = res.stdout + ' ' + res.stderr

      {
        'Sorry, try again' => ['Wrong sudo password.', :bad_sudo_password],
        'sudo: no tty present and no askpass program specified' =>
          ['Sudo requires a password, please configure it.', :sudo_password_required],
        'sudo: command not found' =>
          ["Can't find sudo command. Please either install and "\
            'configure it on the target or deactivate sudo.', :sudo_command_not_found],
        'sudo: sorry, you must have a tty to run sudo' =>
          ['Sudo requires a TTY. Please see the README on how to configure '\
            'sudo to allow for non-interactive usage.', :sudo_no_tty],
      }.each do |sudo, human|
        rawerr = human if rawerr.include? sudo
      end

      rawerr
    end
(see CommandWrapperBase::verify)