ZTK::RescueRetry.try(:ui => config.ui, :tries => ZTK::SSH::RESCUE_RETRY_ATTEMPTS, :on_retry => method(:on_retry)) do
          if (options.use_scp == true)
            scp_download(remote, local, options)
          else
            sftp_download(remote, local, options)