{"id":3435,"date":"2026-07-06T13:19:45","date_gmt":"2026-07-06T11:19:45","guid":{"rendered":"http:\/\/calculs.univ-cotedazur.fr\/?page_id=3435"},"modified":"2026-07-20T14:22:52","modified_gmt":"2026-07-20T12:22:52","slug":"two-factor-authentication-2fa","status":"publish","type":"page","link":"https:\/\/calculs.univ-cotedazur.fr\/?page_id=3435&lang=en","title":{"rendered":"Two-Factor Authentication (2FA)"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_11 counter-hierarchy counter-decimal ez-toc-grey\">\n<nav><ul class=\"ez-toc-list ez-toc-list-level-1\"><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/calculs.univ-cotedazur.fr\/?page_id=3435&amp;lang=en#How_it_works\" title=\"How it works\">How it works<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/calculs.univ-cotedazur.fr\/?page_id=3435&amp;lang=en#I_do_not_have_a_smartphone\" title=\"I do not have a smartphone\">I do not have a smartphone<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/calculs.univ-cotedazur.fr\/?page_id=3435&amp;lang=en#I_no_longer_have_access_to_my_verification_codes\" title=\"I no longer have access to my verification codes\">I no longer have access to my verification codes<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/calculs.univ-cotedazur.fr\/?page_id=3435&amp;lang=en#FileZilla\" title=\"FileZilla\">FileZilla<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/calculs.univ-cotedazur.fr\/?page_id=3435&amp;lang=en#VS_Code_Connection_Multiplexing\" title=\"VS Code &amp; Connection Multiplexing\">VS Code &amp; Connection Multiplexing<\/a><ul class=\"ez-toc-list-level-4\"><li class=\"ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/calculs.univ-cotedazur.fr\/?page_id=3435&amp;lang=en#Linux_\/_macOS\" title=\"Linux \/ macOS\">Linux \/ macOS<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/calculs.univ-cotedazur.fr\/?page_id=3435&amp;lang=en#Windows\" title=\"Windows\">Windows<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/calculs.univ-cotedazur.fr\/?page_id=3435&amp;lang=en#Daily_Workflow_(Windows,_Mac_Linux)\" title=\"Daily Workflow (Windows, Mac &amp; Linux)\">Daily Workflow (Windows, Mac &amp; Linux)<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"How_it_works\"><\/span>How it works<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>During your first connection to the cluster <strong>via a terminal<\/strong>, a giant QR Code will be displayed in your window. If the QR code looks distorted or too big, try reducing your terminal&rsquo;s font size. You only need to scan it once with an authenticator app on your smartphone (such as Google Authenticator, Microsoft Authenticator, Bitwarden, etc.) to save it. The app will then display a code that you need to enter into the terminal. If no code appears, simply close the app and reopen it.<\/p>\n\n\n\n<p>For your future connections, the server will ask for your usual SSH key <strong>AND<\/strong> the 6-digit <strong>verification code<\/strong> generated by your phone (open the app to see the code, and keep in mind that it changes after a short period of time).<\/p>\n\n\n\n<h3><span class=\"ez-toc-section\" id=\"I_do_not_have_a_smartphone\"><\/span><strong>I do not have a smartphone<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Install a password manager or authenticator extension (such as Authenticator, Bitwarden, or 1Password) in your web browser. <\/p>\n\n\n\n<p>Click on the extension. <\/p>\n\n\n\n<p>Add an account by pasting the text-based secret key displayed alongside the QR code in your terminal. The extension will generate the 6-digit code directly in your browser with a simple click (or even via automatic copy-paste). <\/p>\n\n\n\n<p>For your future connections, just reopen the extension to display your verification code.<\/p>\n\n\n\n<h3><span class=\"ez-toc-section\" id=\"I_no_longer_have_access_to_my_verification_codes\"><\/span><strong>I no longer have access to my verification codes<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>If you no longer have access to your two-factor authentication app (due to a changed or lost smartphone, etc.), please <a href=\"https:\/\/calculs.univ-cotedazur.fr\/?page_id=463&amp;lang=en\" data-type=\"page\" data-id=\"463\">contact us<\/a>.<\/p>\n\n\n\n<h3><span class=\"ez-toc-section\" id=\"FileZilla\"><\/span>FileZilla<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p><strong>Important:<\/strong> if you still have issues using FileZilla, other software like <a rel=\"noreferrer noopener\" href=\"https:\/\/winscp.net\/eng\/index.php\" target=\"_blank\">WinSCP <\/a>(for Windows) or <a rel=\"noreferrer noopener\" href=\"https:\/\/cyberduck.io\/\" target=\"_blank\">Cyberduck <\/a>(Mac) offer a more straightforward way to handle two-factor authentication.<\/p>\n\n\n\n<p>In the FileZilla main menu: <strong>Edit &gt; Settings<\/strong>. <\/p>\n\n\n\n<p>In the left column, expand <strong>Connection<\/strong> and click on <strong>SFTP<\/strong>. <\/p>\n\n\n\n<p>Click the <strong>\u00ab\u00a0Add keyfile&#8230;\u00a0\u00bb<\/strong> button. Select your private key (your <code>id_rsa<\/code> or <code>id_ed25519<\/code> file located in <code>~\/.ssh<\/code>). If FileZilla asks to convert it to the <code>.ppk<\/code> format, accept and save it. <\/p>\n\n\n\n<p>Click <strong>OK<\/strong>.<\/p>\n\n\n\n<p>Go to <strong>File &gt; Site Manager<\/strong>.<\/p>\n\n\n\n<p>Create a <strong>New site<\/strong> if you don\u2019t have one for azzurra yet, then fill it out as follows:<\/p>\n\n\n\n<p>You need to enter your azzurra username in the <strong>User<\/strong> field, and most importantly, select <strong>Interactive<\/strong> for the <strong>Logon Type<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"484\" src=\"https:\/\/calculs.univ-cotedazur.fr\/wp-content\/uploads\/2026\/07\/filezillatuto-1-1024x484.png\" alt=\"\" class=\"wp-image-3443\" srcset=\"https:\/\/calculs.univ-cotedazur.fr\/wp-content\/uploads\/2026\/07\/filezillatuto-1-1024x484.png 1024w, https:\/\/calculs.univ-cotedazur.fr\/wp-content\/uploads\/2026\/07\/filezillatuto-1-300x142.png 300w, https:\/\/calculs.univ-cotedazur.fr\/wp-content\/uploads\/2026\/07\/filezillatuto-1-768x363.png 768w, https:\/\/calculs.univ-cotedazur.fr\/wp-content\/uploads\/2026\/07\/filezillatuto-1.png 1260w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Then, when you connect, you will need to enter the passphrase associated with your SSH key (if there is), followed by the verification code displayed on your phone.<\/p>\n\n\n\n<p>If you get a \u00ab\u00a0No more authentication methods available\u00a0\u00bb error, go back to File &gt; Site Manager, and in the \u00ab\u00a0Transfer Settings\u00a0\u00bb tab, make sure the \u00ab\u00a0Limit number of simultaneous connections\u00a0\u00bb box is checked and strictly set to 1:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"975\" height=\"130\" src=\"https:\/\/calculs.univ-cotedazur.fr\/wp-content\/uploads\/2026\/07\/filezillaconnex-1.png\" alt=\"\" class=\"wp-image-3463\" srcset=\"https:\/\/calculs.univ-cotedazur.fr\/wp-content\/uploads\/2026\/07\/filezillaconnex-1.png 975w, https:\/\/calculs.univ-cotedazur.fr\/wp-content\/uploads\/2026\/07\/filezillaconnex-1-300x40.png 300w, https:\/\/calculs.univ-cotedazur.fr\/wp-content\/uploads\/2026\/07\/filezillaconnex-1-768x102.png 768w\" sizes=\"(max-width: 975px) 100vw, 975px\" \/><\/figure>\n\n\n\n<h3><span class=\"ez-toc-section\" id=\"VS_Code_Connection_Multiplexing\"><\/span>VS Code &amp; Connection Multiplexing<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>To prevent VS Code from asking for your 2FA verification code every time it opens a new window, folder, or terminal, you must use <strong>SSH Multiplexing<\/strong>. This allows all VS Code processes to share a single, secure connection tunnel so you only have to authenticate once.<\/p>\n\n\n\n<h4><span class=\"ez-toc-section\" id=\"Linux_\/_macOS\"><\/span>Linux \/ macOS<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Multiplexing works natively and flawlessly on Unix-based systems.<\/p>\n\n\n\n<ol><li>Open your local SSH configuration file (<code>~\/.ssh\/config<\/code>) and add the following lines:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>Host login-hpc.univ-cotedazur.fr\n     HostName login-hpc.univ-cotedazur.fr\n     ControlMaster auto\n     ControlPath ~\/.ssh\/sockets\/%r@%h:%p\n     ControlPersist 10h\n<\/code><\/pre>\n\n\n\n<ol start=\"2\"><li>Before connecting for the first time, you must create the socket directory on your local machine with the <strong>required security permissions<\/strong>:<\/li><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p ~\/.ssh\/sockets &amp;&amp; chmod 700 ~\/.ssh\/sockets\n<\/code><\/pre>\n\n\n\n<h4><span class=\"ez-toc-section\" id=\"Windows\"><\/span>Windows<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>To use multiplexing under Windows without locking up the 2FA authentication process, you must configure both your local SSH file <strong>AND<\/strong> a specific setting inside VS Code.<\/p>\n\n\n\n<p><strong>Step 1: Configure your local SSH file<\/strong> Open your <code>C:\\Users\\YourName\\.ssh\\config<\/code> file and add the following lines (this configuration safely targets your user profile and does not require any administrator privileges):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Host login-hpc.univ-cotedazur.fr\n    HostName login-hpc.univ-cotedazur.fr\n    User your_azzurra_login\n    IdentityFile ~\/.ssh\/id_rsa\n<\/code><\/pre>\n\n\n\n<p>You need to replace your_azzurra_login with your azzurra username and you may need to remplace the IdentityFile path which needs to be your private ssh key location. The file is usually named id_rsa or id_ed25519 (it has no .pub extension).<\/p>\n\n\n\n<p><strong>Step 2: Configure VS Code (Mandatory)<\/strong><\/p>\n\n\n\n<ol><li>Open VS Code on your computer.<\/li><li>Open the <strong>Settings<\/strong> (gear icon in the bottom-left corner \u27a1\ufe0f <em>Settings<\/em>).<\/li><li>In the settings search bar, type: <strong><code>remote.SSH.useLocalServer<\/code><\/strong><\/li><li><strong>Check the box<\/strong> (or set the option to <code>true<\/code>).<\/li><\/ol>\n\n\n\n<p>This option forces VS Code to rely on the native Windows OpenSSH client (which handles multiplexing perfectly) instead of attempting to spawn its own parallel, unstable connections alongside the 2FA prompt.<\/p>\n\n\n\n<h4><span class=\"ez-toc-section\" id=\"Daily_Workflow_(Windows,_Mac_Linux)\"><\/span>Daily Workflow (Windows, Mac &amp; Linux)<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>The procedure is now identical for all operating systems and guarantees an instant connection:<\/p>\n\n\n\n<ol><li>At the beginning of your workday, open a standard terminal (or a PowerShell window on Windows) and log into the cluster:<code>ssh login-hpc.univ-cotedazur.fr<\/code><\/li><li>Enter your password and your 6-digit 2FA verification code. Once successfully logged into the cluster, <strong>leave this terminal open in the background<\/strong> (you can minimize it).<\/li><li>Launch <strong>VS Code<\/strong> and connect to the cluster via the <em>Remote-SSH<\/em> extension.<\/li><\/ol>\n\n\n\n<p><strong>The Result:<\/strong> VS Code will automatically detect the active tunnel established by your terminal, piggyback onto it instantly, and open in less than 2 seconds <strong>without ever asking you for a 2FA code or password for the next 10 hours<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How it works During your first connection to the cluster via a terminal, a giant QR Code will be displayed in your window. If the QR code looks distorted or too big, try reducing your terminal&rsquo;s font size. You only &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":550,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/pages\/3435"}],"collection":[{"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3435"}],"version-history":[{"count":18,"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/pages\/3435\/revisions"}],"predecessor-version":[{"id":3512,"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/pages\/3435\/revisions\/3512"}],"up":[{"embeddable":true,"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=\/wp\/v2\/pages\/550"}],"wp:attachment":[{"href":"https:\/\/calculs.univ-cotedazur.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}