EN
DeutschEnglishРусскийEspañolFrançaisTürkçePortuguês (Brasil)PolskiČeština
Try for free
Passive monitoringAll features at a glanceAction listFile monitoringWeb attacksWordPress securityShop protectionVulnerabilitiesExternal exposure checkProcesses & networkLoginsCompromise checkContainersAI assessmentCalm instead of alert floodsServer healthAgencies & hostersActive defenseActive defense overviewIP blockingSSH approval via apptyrosec appExecution guardServer isolationOne-click hardeningQuarantine & cleanupPricingSecurity & privacyLog in
Comparison

SSH two-factor: tyrosec approval, Duo and Google Authenticator

A second factor for SSH ensures that a copied key or a guessed password alone is not enough. Three common approaches: Duo Unix (pam_duo) with push to your phone, the free PAM module google-authenticator-libpam with one-time codes – and tyrosec’s SSH login approval, built into intrusion detection and defence. The comparison shows which approach fits where.

Reviewed by Marcus Schmidt · as of November 2026

In brief

  • Duo: mature push MFADuo Unix queries the Duo service and sends a push request to Duo Mobile on iOS or Android; plus codes, hardware tokens, SMS and phone calls. If the service is unreachable, the default failmode=safe lets logins through. You need a Duo account; according to the vendor, free for up to 10 users.
  • Google Authenticator: free and offlineThe PAM module checks six-digit one-time codes based on TOTP (RFC 6238) or HOTP locally on the server – without a cloud service, licensed under Apache 2.0. In return, you type a code at every login and manage the secret for each user.
  • tyrosec: approval in the security appEvery new SSH login waits for “Allow” in the tyrosec app. The decision is signed in the phone’s secure hardware and verified by the server itself. The same app shows alerts and undoes measures.
  • What tyrosec cannot dotyrosec approval is only available for Android, only in the Pro plan and only for SSH – sudo and the console have no second factor. There are no codes, hardware tokens or iPhone app.

Comparison at a glance

tyrosec approvalDuo Unix (pam_duo)Google Authenticator (PAM)
Methodpush approval in the app after fingerprint or PINpush (also Verified Push with a code), codes from Duo Mobile, SMS, phone call, hardware tokenssix-digit one-time code (TOTP or HOTP) from an authenticator app
Phone platformsAndroid onlyiOS and Androidany TOTP app, also hardware tokens
Who decidesthe server itself verifies the signature from the phone’s secure hardware – even a compromised central server cannot approve a loginthe Duo service; the server queries its API over TLSthe server checks the code locally
Without internetcentral server unreachable: exceptions apply, other logins are rejected after about a minute; after 10 minutes safe mode, logins go through without asking againfailmode=safe (default): login without a second factor; failmode=secure: no loginworks offline
If the component failsagent stopped: login possible immediately; agent hanging: after about a minute at the latest; logged in both casesif the configuration file is missing, Duo Unix lets logins through without a second factor, according to the vendorif a user’s secret file is missing, no login is possible without the nullok option
With an SSH keyalso applies to key logins, sshd_config stays unchangedchanges to sshd_config required (AuthenticationMethods publickey,keyboard-interactive)changes to sshd_config required (keyboard-interactive, AuthenticationMethods)
Exceptionsusers and networks, e.g. for deploys, locally on the serverby group (groups=), further rules in the Duo Admin Panelvia the PAM configuration or nullok for users without a secret
Risk of locking yourself outswitching on reverts itself after 5 minutes without a confirmed test logintest the configuration yourself; failmode=safe as a fallbacktest the configuration yourself; up to 10 emergency codes per user
Other servicesSSH only (not sudo, su, console)also sudo, console and other PAM servicesany PAM service, e.g. sudo
Account and administrationno separate IdP or MFA account; pairing in the tyrosec control centerDuo account with a UNIX application in the Admin Panel; users enrol with Duono account; secret per user in ~/.google_authenticator
Combined with intrusion detectiona denied login raises an alert; alerts, measures and undo in the same applogs in the Duo Admin Panel; detection on the server not includedno
Pricein the Pro plan: €16 net per month for the first server, €11 for each additional one – regardless of usersper user: free for up to 10 users, otherwise from USD 3 per monthfree (open source, Apache 2.0)

✓ available · ◐ partly or a different approach · ✗ not available. Information about Duo and google-authenticator-libpam according to the vendor or project, see sources below.

When is tyrosec approval the better choice?

  • Login protection and intrusion detection in oneA denied login becomes an alert, and the same app shows attacks and measures taken and undoes IP blocks or isolations.
  • No service should be able to approve logins on its ownThe signature is created in your phone’s secure hardware, and the agent verifies it on the server – neither tyrosec nor an attacker on the central server can approve.
  • You would rather not touch sshd_configtyrosec adds one line to /etc/pam.d/sshd and also applies to key logins. Without a confirmed test login, the server undoes the change itself after 5 minutes.
  • Deploys should keep runningYou exempt deploy users and networks locally on the server; those logins go through without asking.

When are Duo or Google Authenticator the better choice?

  • You need an iPhone or hardware tokensDuo Mobile is available for iOS and Android, plus codes, SMS, phone calls and hardware tokens; TOTP codes work with many apps and tokens. The tyrosec app is only available for Android.
  • Securing sudo and the console tooBoth PAM modules can be used for sudo, the console and other services. tyrosec approval only applies to SSH.
  • One MFA for many applicationsBesides SSH, Duo also covers VPN, single sign-on and cloud applications, with central policies per user.
  • Free and without a cloudgoogle-authenticator-libpam is free, checks codes offline on the server and needs no service – not from tyrosec either.

Frequently asked questions

What is SSH two-factor authentication?

In addition to the first factor – an SSH key or password – the server requires a second proof, usually from your phone: a one-time code or approval of a push request. A stolen key alone is then not enough.

Push or one-time code – which is more secure?

Both protect against stolen keys and passwords. Codes work offline but can be phished on fake pages; push shows who is logging in, but many requests can tempt you to approve too quickly. tyrosec shows server, user, IP address and country and only asks for logins that are not exempted.

Can I combine tyrosec approval with Google Authenticator?

In principle, yes. tyrosec approval checks in the PAM “account” phase, TOTP modules in the “auth” phase – for example TOTP for sudo and tyrosec approval for SSH.

What if I lose my phone?

Log in via your hoster’s console or from an exempted address and switch approval off with sudo tyrosecd ssh-approval disable. More under SSH approval via app.

Is the tyrosec app available for the iPhone?

Not at the moment; the tyrosec app is only available for Android.

See what’s happening on your server in two minutes.

Install the agent with a one-liner, wait for the initial scan, done. 14 days free, up to 3 servers, no credit card required.

Sources

  1. Duo: Duo Unix – Two-Factor Authentication for SSH (pam_duo, failmode, groups, public key authentication): https://duo.com/docs/duounix
  2. Duo: pricing: https://duo.com/pricing
  3. google-authenticator-libpam: README (TOTP/HOTP, nullok, setup): https://github.com/google/google-authenticator-libpam
  4. google-authenticator-libpam: google-authenticator manual (emergency codes, rate limit): https://github.com/google/google-authenticator-libpam/blob/master/man/google-authenticator.1.md
  5. RFC 6238: TOTP – Time-Based One-Time Password Algorithm: https://www.rfc-editor.org/rfc/rfc6238

As of November 2026. Information about Duo and google-authenticator-libpam is taken from the pages listed above and may change; the current information from the vendor or project is authoritative. Duo prices in US dollars per user; tyrosec prices exclude VAT. Product names are trademarks of their respective owners.