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:
- SSH Login to MDX: Connecting from your local PC to the MDX workflow server
- Git SSH Key Setup: Cloning from private repositories to MDX
- 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
z12345with your actual account name andgz00with 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.
![]()
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:
![]()
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:
![]()
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:
![]()
ssh mdx
Or:
![]()
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:
![]()
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:
![]()
cat ~/.ssh/id_ed25519_github.pub
Copy the output and register it on GitHub:
- Log in to GitHub
- Go to Settings → SSH and GPG keys → New SSH key
- Title:
MDX Workflow Server - Key: Paste the copied public key
- Click Add SSH key
Step 2.3: Edit SSH Configuration File (on MDX)¶
Edit ~/.ssh/config on the MDX server:
![]()
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:
![]()
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:
![]()
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.
![]()
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:
![]()
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:
![]()
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:
![]()
ssh miyabi-c
Or:
![]()
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:
![]()
# 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:
![]()
ssh -v mdx
Or:
![]()
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:
![]()
ssh -vT git@github.com
Check the error messages and verify that your public key is correctly registered on GitHub.
Security Best Practices¶
- Use Passphrases: Always set a passphrase for your SSH keys
- Key Management: Never share your private keys
- Regular Key Rotation: Consider rotating keys periodically for security
END OF GUIDE