Skip to content

Tutorial: SSH Connection Setup for MDX and Miyabi-C with Git Configuration

This tutorial explains how to set up SSH login to the MDX workflow server, configure Git for cloning from private repositories, and establish SSH connections to Miyabi-C.

Overview

This tutorial covers the following configurations:

  1. SSH Login to MDX: Connecting from your local PC to the MDX workflow server
  2. Git SSH Key Setup: Cloning from private repositories to MDX
  3. SSH Key Setup for Miyabi-C: Logging in to Miyabi-C from MDX

Prerequisites

  • MDX workflow server account (e.g., z12345)
  • Miyabi-C account and group (e.g., gz00/z12345)
  • GitHub account (with access to the target private repository and permission to add SSH keys)
  • OTP authentication app such as Google Authenticator or Microsoft Authenticator (for Miyabi-C login)

[!IMPORTANT] Replace z12345 with your actual account name and gz00 with your actual group name throughout this guide.

[!IMPORTANT] This guide covers two separate SSH connections: 1. Local PC -> MDX workflow client (mdx-workflow.example.org) 2. MDX workflow client -> Miyabi-C (miyabi-c.example.org)

Use the same login username for both MDX and Miyabi-C (for example, z12345).

These two connections use different SSH keys: - MDX login key: generated on your local PC and registered with the MDX administrator - Miyabi-C login key: generated on MDX and registered on the Miyabi portal

Before the Session

If this guide is distributed before a hands-on session, we recommend completing Step 1.1 on your local PC in advance. If possible, also complete Step 1.2 by sending your MDX public key to the contact provided by your organizer. If these steps are not completed in advance, they can also be completed during the session.

Please make sure you have the following ready:

  • your MDX/Miyabi-C account name
  • your GitHub account name, access to the target private repository, and permission to add an SSH key to GitHub
  • an OTP app such as Google Authenticator or Microsoft Authenticator

Part 1: SSH Login Setup for MDX

Step 1.1: Generate SSH Key Pair on Local PC

Create a new SSH key pair on your local PC.

pc

ssh-keygen -t ed25519 -C "your_email@example.com" -f ~/.ssh/id_ed25519_mdx

When prompted, set a passphrase (recommended).

Generated files: - ~/.ssh/id_ed25519_mdx (private key) - ~/.ssh/id_ed25519_mdx.pub (public key)

Step 1.2: Register Public Key on MDX Server

Display the public key content:

pc

cat ~/.ssh/id_ed25519_mdx.pub

Example output:

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAbCdEfGhIjKlMnOpQrStUvWxYz your_email@example.com

Send this public key to your MDX administrator to register it with your account. Use the contact address provided in the invitation email or by your organizer.

Step 1.3: Edit SSH Configuration File

Edit the ~/.ssh/config file on your local PC:

pc

nano ~/.ssh/config
# or use your preferred editor, for example: vim ~/.ssh/config

If you use nano, press Ctrl+O to save and Ctrl+X to exit.

Add the following configuration:

Host mdx
    HostName mdx-workflow.example.org
    User z12345
    IdentityFile ~/.ssh/id_ed25519_mdx
    ForwardAgent yes

Step 1.4: Test MDX Connection

Once configured, connect to MDX:

pc

ssh mdx

Or:

pc

ssh -A z12345@mdx-workflow.example.org

On first connection, you will be asked to verify the host key. Type yes to continue.


Part 2: Git SSH Key Setup (for Private Repositories)

If the tutorial uses a private GitHub repository, this part is required before you can clone the repository on MDX.

Step 2.1: Generate Git SSH Key Pair on MDX

While logged into the MDX server, create a key for Git:

mdx

ssh-keygen -t ed25519 -C "your_email@example.com" -f ~/.ssh/id_ed25519_github

Generated files: - ~/.ssh/id_ed25519_github (private key) - ~/.ssh/id_ed25519_github.pub (public key)

Step 2.2: Register Public Key on GitHub

Display the public key content:

mdx

cat ~/.ssh/id_ed25519_github.pub

Copy the output and register it on GitHub:

  1. Log in to GitHub
  2. Go to SettingsSSH and GPG keysNew SSH key
  3. Title: MDX Workflow Server
  4. Key: Paste the copied public key
  5. Click Add SSH key

Step 2.3: Edit SSH Configuration File (on MDX)

Edit ~/.ssh/config on the MDX server:

mdx

nano ~/.ssh/config
# or use your preferred editor, for example: vim ~/.ssh/config

Add the following configuration:

Host github.com
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_ed25519_github
    IdentitiesOnly yes

Step 2.4: Test GitHub Connection

Test the connection to GitHub:

mdx

ssh -T git@github.com

On first connection, you will be asked to verify the host key. Type yes to continue.

If successful, you will see a message like:

Hi username! You've successfully authenticated, but GitHub does not provide shell access.

Step 2.5: Clone Private Repository

You can now clone private repositories:

mdx

cd /work/gz00/z12345
git clone git@github.com:your-org/your-private-repo.git

Replace your-org and your-private-repo with the actual GitHub organization/user name and repository name provided for your environment.


Part 3: SSH Key Setup for Miyabi-C

[!NOTE] We recommend generating and registering the SSH key for Miyabi-C on MDX before the session if possible. However, some users may not have completed this in advance, so we will also reserve time during the session to explain the procedure and complete the setup together.

Step 3.1: Generate SSH Key Pair for Miyabi-C on MDX

While logged into the MDX server, create a key for Miyabi-C: This key must be generated on the MDX workflow client, not on your local PC.

mdx

ssh-keygen -t ed25519 -C "your_email@example.com" -f ~/.ssh/id_ed25519_miyabi

Generated files: - ~/.ssh/id_ed25519_miyabi (private key) - ~/.ssh/id_ed25519_miyabi.pub (public key)

Step 3.2: Register Public Key on Miyabi-C

Display the public key content:

mdx

cat ~/.ssh/id_ed25519_miyabi.pub

Register this public key on the Miyabi User Portal.

Step 3.3: Edit SSH Configuration File (on MDX)

Edit ~/.ssh/config on the MDX server:

mdx

nano ~/.ssh/config
# or use your preferred editor, for example: vim ~/.ssh/config

Add the following configuration:

Host miyabi-c
    HostName miyabi-c.example.org
    User z12345
    IdentityFile ~/.ssh/id_ed25519_miyabi

Step 3.4: Test Miyabi-C Connection

Connect to Miyabi-C:

mdx

ssh miyabi-c

Or:

mdx

ssh z12345@miyabi-c.example.org

On first connection, you will be prompted to enter an OTP (one-time password). Enter the code generated by your authentication app.

If successful, you will be connected to the Miyabi-C login node:

miyabi

# Successfully logged in to Miyabi-C


Complete SSH Configuration File Examples

Local PC (~/.ssh/config)

Host mdx
    HostName mdx-workflow.example.org
    User z12345
    IdentityFile ~/.ssh/id_ed25519_mdx
    ForwardAgent yes

MDX Server (~/.ssh/config)

Host github.com
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_ed25519_github
    IdentitiesOnly yes

Host miyabi-c
    HostName miyabi-c.example.org
    User z12345
    IdentityFile ~/.ssh/id_ed25519_miyabi

Troubleshooting

Connection Issues

Display detailed debug information when attempting to connect:

pc

ssh -v mdx

Or:

mdx

ssh -v miyabi-c

Check Key Permissions

Verify that SSH key permissions are correct:

chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_ed25519_*
chmod 644 ~/.ssh/id_ed25519_*.pub

GitHub Connection Errors

If you have issues connecting to GitHub:

mdx

ssh -vT git@github.com

Check the error messages and verify that your public key is correctly registered on GitHub.


Security Best Practices

  1. Use Passphrases: Always set a passphrase for your SSH keys
  2. Key Management: Never share your private keys
  3. Regular Key Rotation: Consider rotating keys periodically for security

END OF GUIDE