How to Connect to SSH Using 2FA with StackCP

Author:

Published:

Updated on August 15, 2024

Reading Time: 1 min read

SSH using 2FA #

Connecting to your StackCP package via SSH using two-factor authentication (2FA) provides an extra layer of security. Here’s how to set it up and connect on different platforms. Note: It is recommended to connect via SSH only if you’re familiar with the command line interface.

Setting up Your Authenticator #

  1. Download Google Authenticator:
    • Available for both iOS and Android devices.
  2. Configure SSH Access:
    • Log in to StackCP, head to Manage Hosting, and select the package requiring SSH access.
    • Select SSH Access under the Security section.
    • Under Set SSH password, set the password and make note of it for later use.
    • Select Set up Authenticator and scan the QR code on your iOS or Android device using the Google Authenticator app.

Connecting via SSH with 2FA #

For Windows Users #

  1. Download PuTTY:
    • You can download PuTTY from the official PuTTY website.
  2. Wait 30 Minutes:
    • After setting up 2FA, wait for 30 minutes before attempting to connect.
  3. Open PuTTY:
    • Enter the SSH hostname.
      • For UK: ssh.gb.stackcp.com
      • For US: ssh.us.stackcp.com
    • Click Open.
  4. Log in:
    • When prompted for a login, enter your domain (e.g., example.co.uk).
    • Enter the verification code from Google Authenticator.
    • Enter the SSH password set up earlier.

You now have SSH access via 2FA.

For Apple Mac Users #

  1. Open Terminal:
    • Enter the SSH hostname and username:
      • UK: ssh domain.com@ssh.gb.stackcp.com
      • US: ssh domain.com@ssh.us.stackcp.com
  2. Log in:
    • When prompted for a password, enter the password set during 2FA setup.
    • Enter the Google Authenticator code when prompted.

You now have SSH access via 2FA.