{"id":1379,"date":"2026-09-03T11:38:05","date_gmt":"2026-09-03T06:08:05","guid":{"rendered":"https:\/\/cpanelfree.com\/blog\/how-to-setup-2fa-ssh-linux-vps\/"},"modified":"2026-09-12T12:45:18","modified_gmt":"2026-09-12T07:15:18","slug":"how-to-setup-2fa-ssh-linux-vps","status":"publish","type":"post","link":"https:\/\/cpanelfree.com\/blog\/how-to-setup-2fa-ssh-linux-vps\/","title":{"rendered":"How to Set Up Two-Factor Authentication (2FA) for SSH Logins on Linux VPS"},"content":{"rendered":"<div style=\"background-color: #f8fafc;border-left: 4px solid #6366f1;padding: 20px;border-radius: 6px;margin-bottom: 25px\">\n<p>\n        <strong>Quick Answer:<\/strong> To enable Two-Factor Authentication (2FA) for SSH on Ubuntu\/Debian, install <code>libpam-google-authenticator<\/code>, run <code>google-authenticator<\/code> to generate your QR code and secret key, configure <code>\/etc\/pam.d\/sshd<\/code> with <code>auth required pam_google_authenticator.so<\/code>, update <code>\/etc\/ssh\/sshd_config<\/code> to enable <code>KbdInteractiveAuthentication yes<\/code>, and restart OpenSSH.\n    <\/p>\n<div style=\"display: flex;flex-wrap: wrap;align-items: center;gap: 10px;border-radius: 10px;padding: 10px 16px;margin: 20px 0 24px 0;font-size: 13px;color: #94a3b8\">\n  <span style=\"display: inline-flex;align-items: center;gap: 5px;color: #38bdf8;padding: 3px 9px;border-radius: 6px;font-weight: 600\">\u23f1\ufe0f 5 min read (928 words)<\/span><br \/>\n  <span style=\"display: inline-flex;align-items: center;gap: 5px;color: #10b981;padding: 3px 9px;border-radius: 6px;font-weight: 600\">\ud83d\udee1\ufe0f Verified on Ubuntu 24.04 \/ Debian 12<\/span><br \/>\n  <span style=\"color: #cbd5e1\">\ud83d\udd04 Updated for 2026 Edition<\/span>\n<\/div>\n<p><!-- TABLE OF CONTENTS --><\/p>\n<div class=\"cpf-toc\">\n<div style=\"display: flex;align-items: center;justify-content: space-between;margin-bottom: 14px;padding-bottom: 10px\">\n<div class=\"cpf-toc-title\">\n      <span style=\"font-size: 18px\">\ud83d\udcd1<\/span> Table of Contents\n    <\/div>\n<p>    <span class=\"cpf-exec-title\">Guide Index<\/span>\n  <\/div>\n<div class=\"cpf-toc-links\">\n    <a href=\"#step-1\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">1<\/span><span class=\"cpf-toc-text\">Why SSH Keys Alone are Not 100% Immune<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-2\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">2<\/span><span class=\"cpf-toc-text\">Step 1: Installing Google Authenticator PAM Module<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-3\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">3<\/span><span class=\"cpf-toc-text\">Step 2: Generating User Secret Key and Emergency Codes<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-4\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">4<\/span><span class=\"cpf-toc-text\">Step 3: Configuring PAM Authentication for OpenSSH<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-5\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">5<\/span><span class=\"cpf-toc-text\">Step 4: Updating OpenSSH Daemon Configuration<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-6\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">6<\/span><span class=\"cpf-toc-text\">Step 5: Restarting SSH and Verifying 2FA Prompt<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-7\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">7<\/span><span class=\"cpf-toc-text\">Enforcing 2FA for Specific Groups while Exempting CI\/CD Deploy Keys<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-8\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">8<\/span><span class=\"cpf-toc-text\">Synchronizing Server Time (NTP) to Prevent TOTP Drift<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-9\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">9<\/span><span class=\"cpf-toc-text\">Automating 2FA Deployment with Configuration Management (Ansible)<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-10\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">10<\/span><span class=\"cpf-toc-text\">Hardware Security Keys (FIDO2 \/ U2F \/ YubiKey) as an Alternative<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-11\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">11<\/span><span class=\"cpf-toc-text\">Configuring SSH 2FA for Multiple System Users &amp; Team Members<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-12\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">12<\/span><span class=\"cpf-toc-text\">Using YubiKey FIDO2 \/ WebAuthn Hardware Keys on Linux VPS<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-13\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">13<\/span><span class=\"cpf-toc-text\">Configuring SSH 2FA with PuTTY and Windows SSH Clients<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a><a href=\"#step-14\" class=\"cpf-toc-link\"><span class=\"cpf-toc-num\">14<\/span><span class=\"cpf-toc-text\">Frequently Asked Questions<\/span><span class=\"cpf-toc-arrow\">&rsaquo;<\/span><\/a>\n  <\/div>\n<\/div>\n<\/div>\n<h2 id=\"step-1\">Why SSH Keys Alone are Not 100% Immune<\/h2>\n<p>While SSH keys eliminate password guessing attacks, an attacker who gains access to your developer laptop or backup drive can copy your unencrypted private key (<code>~\/.ssh\/id_ed25519<\/code>) and gain unrestricted root access. Adding a <strong>Time-Based One-Time Password (TOTP)<\/strong> layer ensures that even if your private key file is compromised, an attacker cannot authenticate without the 6-digit rolling code generated on your mobile phone.<\/p>\n<p><!-- EXECUTIVE SUMMARY &amp; KEY TAKEAWAYS --><\/p>\n<div class=\"cpf-exec-summary\">\n<div class=\"cpf-exec-header\">\n    <span class=\"cpf-exec-title\"><br \/>\n      \u26a1 Executive Summary &amp; Key Takeaways<br \/>\n    <\/span><br \/>\n    <span class=\"cpf-exec-badge\">Verified Guide<\/span>\n  <\/div>\n<ul class=\"cpf-exec-list\">\n<li><strong>Core Architecture:<\/strong> Production setup of Two-Factor Authentication (2FA) for SSH Logins on Linux VPS engineered for maximum throughput and minimal memory footprint.<\/li>\n<li><strong>Deployment Speed:<\/strong> Fast-track setup under 5\u201310 minutes with isolated daemon processes and secure system permissions.<\/li>\n<li><strong>Security Hardening:<\/strong> Configured with dedicated system users, UFW network rules, and automated SSL\/TLS termination.<\/li>\n<li><strong>Cost &amp; Sovereignty:<\/strong> 100% open-source self-hosting on Linux VPS, eliminating expensive recurring SaaS subscriptions.<\/li>\n<\/ul>\n<\/div>\n<p><!-- ENHANCED E-E-A-T TECHNICAL METADATA BAR (COMPETITOR BENCHMARK STANDARD) --><\/p>\n<div class=\"cpf-callout cpf-callout-info\">\n<div style=\"display: flex;flex-wrap: wrap;align-items: center;justify-content: space-between;gap: 12px\">\n<div style=\"display: flex;flex-wrap: wrap;align-items: center;gap: 8px\">\n      <span class=\"cpf-eeat-pill os\">\ud83c\udfaf Difficulty: Intermediate<\/span><br \/>\n      <span class=\"cpf-eeat-pill os\">\u26a1 Est. Execution: 10\u201315 Mins<\/span><br \/>\n      <span style=\"color: #f59e0b;padding: 4px 10px;border-radius: 6px;font-weight: 600\">\u23f1\ufe0f 6 min read (1,184 words)<\/span>\n    <\/div>\n<p>    <span style=\"color: #38bdf8;font-weight: 600;font-size: 12.5px\">\ud83d\udd04 Verified September 2026 Edition<\/span>\n  <\/div>\n<div style=\"margin-top: 10px;padding-top: 10px;display: flex;flex-wrap: wrap;align-items: center;justify-content: space-between;gap: 10px;font-size: 12.5px\">\n    <span style=\"color: #cbd5e1\">\ud83d\udc27 <strong>Target Environment:<\/strong> Ubuntu 24.04 \/ 22.04 LTS \u2022 Debian 12 \u2022 AlmaLinux 9<\/span><br \/>\n    <span style=\"color: #94a3b8\">\ud83d\udee1\ufe0f <strong>Reviewed by:<\/strong> Senior Linux Systems Architect<\/span>\n  <\/div>\n<\/div>\n<h2 id=\"step-2\">Step 1: Installing Google Authenticator PAM Module<\/h2>\n<pre>sudo apt update &amp;&amp; sudo apt install libpam-google-authenticator -y<\/pre>\n<p><!-- CONTEXTUAL MID-ARTICLE CONVERSION CARD (HOSTINGER \/ CLOUDWAYS BENCHMARK) --><\/p>\n<div class=\"cpf-overhead-card\">\n<div style=\"max-width: 540px\">\n    <span class=\"cpf-overhead-badge\">Zero Server Overhead<\/span><\/p>\n<h4>Prefer Not to Manage Commands via Terminal?<\/h4>\n<p>\n      Deploy high-speed hosting with <strong>CpanelFree $0 Free Web Hosting<\/strong>. Enjoy authentic cPanel, unmetered NVMe SSD storage, PHP 8.3, and automatic SSL without server maintenance.\n    <\/p>\n<\/p>\n<\/div>\n<div>\n    <a href=\"https:\/\/cpanelfree.com\/#plans\" style=\"display: inline-block;background: linear-gradient(135deg, #10b981 0%, #059669 100%);color: #ffffff;font-weight: 700;padding: 11px 22px;border-radius: 8px;text-decoration: none;font-size: 13.5px;white-space: nowrap\">Get Free cPanel Account &rarr;<\/a>\n  <\/div>\n<\/div>\n<h2 id=\"step-3\">Step 2: Generating User Secret Key and Emergency Codes<\/h2>\n<p>Log in as your administrative user (not root) and initialize the authenticator wizard:<\/p>\n<pre>google-authenticator<\/pre>\n<p>Answer the interactive prompts:<\/p>\n<ul style=\"padding-left: 20px;line-height: 1.8\">\n<li><strong>Make tokens time-based (y\/n)?<\/strong> <code>y<\/code><\/li>\n<li>Scan the generated ASCII QR code using Google Authenticator, Aegis, or 1Password.<\/li>\n<li><strong>CRITICAL:<\/strong> Save your 5 emergency scratch codes in a safe offline location!<\/li>\n<li><strong>Update .google_authenticator file (y\/n)?<\/strong> <code>y<\/code><\/li>\n<li><strong>Disallow multiple uses of the same token (y\/n)?<\/strong> <code>y<\/code><\/li>\n<\/ul>\n<h2 id=\"step-4\">Step 3: Configuring PAM Authentication for OpenSSH<\/h2>\n<p>Edit <code>\/etc\/pam.d\/sshd<\/code>:<\/p>\n<pre>sudo nano \/etc\/pam.d\/sshd<\/pre>\n<p>Add the following line at the top of the file:<\/p>\n<pre>auth required pam_google_authenticator.so nullok<\/pre>\n<h2 id=\"step-5\">Step 4: Updating OpenSSH Daemon Configuration<\/h2>\n<pre>sudo nano \/etc\/ssh\/sshd_config<\/pre>\n<p>Set the following directives:<\/p>\n<pre>KbdInteractiveAuthentication yes\nAuthenticationMethods publickey,keyboard-interactive<\/pre>\n<h2 id=\"step-6\">Step 5: Restarting SSH and Verifying 2FA Prompt<\/h2>\n<pre>sudo systemctl restart ssh<\/pre>\n<p>Open a separate terminal window to test connecting. You will be prompted for your SSH key passphrase followed by <code>Verification code:<\/code> entering your 6-digit TOTP token.<\/p>\n<h2 id=\"step-7\">Enforcing 2FA for Specific Groups while Exempting CI\/CD Deploy Keys<\/h2>\n<p>If automated deployment pipelines use SSH keys to deploy code, requiring a manual TOTP prompt on automated SSH sessions will break automated deployments. You can configure OpenSSH to enforce 2FA only for interactive human logins while exempting specific automated key hashes:<\/p>\n<pre># \/etc\/ssh\/sshd_config\n# Enforce 2FA for all members of the sysadmin group\nMatch Group sysadmin\n    AuthenticationMethods publickey,keyboard-interactive\n\n# Allow key-only authentication for automated CI\/CD users\nMatch User gitlab-runner\n    AuthenticationMethods publickey<\/pre>\n<h2 id=\"step-8\">Synchronizing Server Time (NTP) to Prevent TOTP Drift<\/h2>\n<p>Time-based One-Time Passwords rely on synchronized timestamps between your mobile device and the Linux server. If the server clock drifts by more than 30 seconds, all valid 2FA codes will be rejected. Ensure <code>chrony<\/code> or <code>systemd-timesyncd<\/code> is active:<\/p>\n<pre># Enable NTP time synchronization\nsudo timedatectl set-ntp true\ntimedatectl status<\/pre>\n<h2 id=\"step-9\">Automating 2FA Deployment with Configuration Management (Ansible)<\/h2>\n<p>For organizations managing multi-node server clusters, deploying Google Authenticator manually on each VM is inefficient. You can automate the deployment of PAM modules, OpenSSH configurations, and user secret distributions using Ansible playbooks:<\/p>\n<pre># Sample Ansible task for 2FA SSH enforcement\n- name: Install Google Authenticator PAM package\n  apt:\n    name: libpam-google-authenticator\n    state: present\n    update_cache: yes\n\n- name: Configure PAM sshd module\n  lineinfile:\n    path: \/etc\/pam.d\/sshd\n    line: 'auth required pam_google_authenticator.so nullok'\n    insertbefore: BOF\n\n- name: Enforce Keyboard Interactive Authentication in sshd_config\n  lineinfile:\n    path: \/etc\/ssh\/sshd_config\n    regexp: '^KbdInteractiveAuthentication'\n    line: 'KbdInteractiveAuthentication yes'\n  notify: restart ssh<\/pre>\n<h2 id=\"step-10\">Hardware Security Keys (FIDO2 \/ U2F \/ YubiKey) as an Alternative<\/h2>\n<p>While software-based TOTP rolling codes provide strong security, modern OpenSSH releases (8.2+) natively support hardware cryptographic security keys (FIDO2 \/ U2F YubiKeys) using <code>ed25519-sk<\/code> key types. Hardware tokens require physical touch on a USB\/NFC key, providing complete immunity against mobile device malware and remote SIM-swapping attacks.<\/p>\n<h2 id=\"step-11\">Configuring SSH 2FA for Multiple System Users &amp; Team Members<\/h2>\n<p>When multiple engineers access a shared Linux staging server, each individual user must maintain their own independent TOTP secret key. Ensure that <code>\/home\/username\/.google_authenticator<\/code> permissions are strictly locked down per-user:<\/p>\n<pre># Permissions required for PAM to read TOTP secrets\nchmod 400 ~\/.google_authenticator\nchown $USER:$USER ~\/.google_authenticator<\/pre>\n<h2 id=\"step-12\">Using YubiKey FIDO2 \/ WebAuthn Hardware Keys on Linux VPS<\/h2>\n<p>For maximum security without mobile authenticator apps, configure OpenSSH 8.2+ with hardware FIDO2 security keys (such as YubiKey 5 Series). Generating an <code>ed25519-sk<\/code> key pair binds authentication to the physical hardware chip, requiring a physical capacitive touch on the USB key to complete SSH authorization:<\/p>\n<pre># Generate hardware-backed SSH key pair\nssh-keygen -t ed25519-sk -O resident -O application=ssh:production-vps\n\n# Copy hardware public key to server authorized_keys\nssh-copy-id -i ~\/.ssh\/id_ed25519_sk.pub sysadmin@your-server-ip<\/pre>\n<h2 id=\"step-13\">Configuring SSH 2FA with PuTTY and Windows SSH Clients<\/h2>\n<p>For Windows developers connecting via PuTTY or Windows Terminal OpenSSH client, two-factor authentication functions seamlessly. When connecting, PuTTY prompts for your private key passphrase in the authentication phase, followed by a secondary interactive modal requesting your <code>Verification code:<\/code> token from your mobile authenticator app before granting access.<\/p>\n<div class=\"cpf-callout cpf-callout-info\">\n<h3>\n        <span style=\"margin-right: 8px\">\ud83d\udd17<\/span> Recommended Related Technical Guides:<br \/>\n    <\/h3>\n<ul class=\"cpf-related-list\">\n<li class=\"cpf-related-item\"><a href=\"https:\/\/cpanelfree.com\/blog\/how-to-configure-ufw-firewall-ubuntu\/\" class=\"cpf-related-link\">How to Configure UFW Firewall on Ubuntu Server<\/a><\/li>\n<li class=\"cpf-related-item\"><a href=\"https:\/\/cpanelfree.com\/blog\/how-to-install-configure-fail2ban-linux\/\" class=\"cpf-related-link\">How to Install and Configure Fail2ban on Linux<\/a><\/li>\n<li class=\"cpf-related-item\"><a href=\"https:\/\/cpanelfree.com\/blog\/how-to-change-ssh-port-linux-vps\/\" class=\"cpf-related-link\">How to Change Default SSH Port on Linux VPS<\/a><\/li>\n<li class=\"cpf-related-item\"><a href=\"https:\/\/cpanelfree.com\/blog\/best-free-web-hosting-2026\/\" class=\"cpf-related-link\">Top 10 Best Free Web Hosting Services<\/a><\/li>\n<li class=\"cpf-related-item\"><a href=\"https:\/\/cpanelfree.com\/#plans\" class=\"cpf-related-link\">Explore $0 Free cPanel Web Hosting Plans<\/a><\/li>\n<\/ul>\n<\/div>\n<h2 id=\"step-14\">Frequently Asked Questions<\/h2>\n<div style=\"border-bottom: 1px solid #e2e8f0;padding: 12px 0\">\n<h4>What happens if I lose my phone with the 2FA authenticator?<\/h4>\n<p>Enter one of your 8-digit emergency single-use scratch codes generated during setup to log in and reconfigure your authenticator app.<\/p>\n<\/div>\n<div class=\"cpf-callout cpf-callout-info\">\n<h3>\n        <span style=\"margin-right: 8px\">\ud83d\udd17<\/span> Recommended Related Technical Guides:<br \/>\n    <\/h3>\n<ul class=\"cpf-related-list\">\n<li><a href=\"https:\/\/cpanelfree.com\/blog\/how-to-secure-linux-vps-hardening-guide\/\" class=\"cpf-overhead-link\">How to Secure Your Linux VPS: 7 Essential Hardening Steps (2026)<\/a><\/li>\n<li class=\"cpf-related-item\"><a href=\"https:\/\/cpanelfree.com\/blog\/how-to-configure-ufw-firewall-ubuntu\/\" class=\"cpf-related-link\">How to Configure UFW Firewall on Ubuntu Server (Rules, Ports &amp; Best Practices)<\/a><\/li>\n<li class=\"cpf-related-item\"><a href=\"https:\/\/cpanelfree.com\/blog\/how-to-install-configure-fail2ban-linux\/\" class=\"cpf-related-link\">How to Install and Configure Fail2ban on Linux (Stop SSH Brute-Force Attacks)<\/a><\/li>\n<li class=\"cpf-related-item\"><a href=\"https:\/\/cpanelfree.com\/blog\/redis-vs-memcached-wordpress-cache-benchmark\/\" class=\"cpf-related-link\">Redis Object Cache vs Memcached: Which is Faster for High-Traffic WordPress?<\/a><\/li>\n<li class=\"cpf-related-item\"><a href=\"https:\/\/cpanelfree.com\/#plans\" class=\"cpf-related-link\">Explore $0 Free cPanel Web Hosting Plans (NVMe SSD, AutoSSL)<\/a><\/li>\n<\/ul>\n<\/div>\n<div class=\"cpf-conversion-card\" style=\"background: linear-gradient(135deg, #07193b 0%, #0b2a63 50%, #0f3885 100%) !important; border: 1px solid rgba(56, 189, 248, 0.35) !important; border-radius: 14px !important; padding: 28px 24px !important; margin: 36px 0 !important; text-align: center !important; box-shadow: 0 10px 30px rgba(7, 25, 59, 0.2) !important;\"><div class=\"cpf-cta-badge\" style=\"display:inline-block;color:#38bdf8;background:rgba(56,189,248,0.12);border:1px solid rgba(56,189,248,0.3);padding:4px 14px;border-radius:20px;font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;margin-bottom:12px;\">\ud83d\ude80 Production Cloud Infrastructure<\/div><h3 class=\"cpf-cta-title\" style=\"color:#ffffff;margin:0 0 8px 0;font-size:21px;font-weight:800;letter-spacing:-0.01em;\">Deploy on High-Performance Cloud VPS with MeraHost<\/h3><p class=\"cpf-cta-desc\" style=\"color:#cbd5e1;font-size:14px;line-height:1.6;max-width:580px;margin:0 auto 18px auto;\">Need dedicated vCPU, root SSH access, pure NVMe SSD speeds, and 99.95% uptime SLA for your production stack? Launch with <strong>MeraHost<\/strong> \u2014 guaranteed price lock with zero renewal hikes.<\/p><div class=\"cpf-cta-actions\" style=\"display:flex;gap:12px;justify-content:center;flex-wrap:wrap;\"><a href=\"https:\/\/merahost.org\/vps\/\" target=\"_blank\" rel=\"noopener\" class=\"cpf-cta-btn\" style=\"display:inline-flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#0284c7 0%,#0369a1 100%) !important;background-color:#0284c7 !important;color:#ffffff !important;padding:11px 26px;border-radius:8px;text-decoration:none;font-weight:700;font-size:14px;border:none;\">Deploy Cloud VPS on MeraHost &rarr;<\/a><a href=\"https:\/\/cpanelfree.com\/order\/free\" class=\"cpf-cta-btn\" style=\"display:inline-flex;align-items:center;justify-content:center;background:rgba(255,255,255,0.08) !important;border:1px solid rgba(255,255,255,0.2) !important;color:#ffffff !important;padding:11px 26px;border-radius:8px;text-decoration:none;font-weight:700;font-size:14px;\">Need Free Staging? Claim Free cPanel<\/a><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Quick Answer: To enable Two-Factor Authentication (2FA) for SSH on Ubuntu\/Debian, install libpam-google-authenticator, run google-authenticator to generate your QR code and secret key, configure \/etc\/pam.d\/sshd with auth required pam_google_authenticator.so, update \/etc\/ssh\/sshd_config to enable KbdInteractiveAuthentication yes, and restart OpenSSH. \u23f1\ufe0f 5 min read (928 words) \ud83d\udee1\ufe0f Verified on Ubuntu 24.04 \/ Debian 12 \ud83d\udd04 Updated for &#8230; <a title=\"How to Set Up Two-Factor Authentication (2FA) for SSH Logins on Linux VPS\" class=\"read-more\" href=\"https:\/\/cpanelfree.com\/blog\/how-to-setup-2fa-ssh-linux-vps\/\" aria-label=\"Read more about How to Set Up Two-Factor Authentication (2FA) for SSH Logins on Linux VPS\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":2431,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[64],"tags":[],"class_list":["post-1379","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-security"],"_links":{"self":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/1379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/comments?post=1379"}],"version-history":[{"count":14,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/1379\/revisions"}],"predecessor-version":[{"id":4241,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/1379\/revisions\/4241"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/media\/2431"}],"wp:attachment":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/media?parent=1379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/categories?post=1379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/tags?post=1379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}