SSH on UCloud

Basic commands HPC Launch https://hds-sandbox.github. io/HPC-lab/

Alba Refoyo
Jennifer Bartell

2025-05-21

Generate SSH Key Pair

Navigate to the location where all SSH keys are stored to generate a new one (skip these first two commands if you haven’t used SSH keys before).

Mac/Linux
cd ~/.ssh 

Windows
cd C:\Users\<YourUsername>\.ssh

We will specify the type of key to create with the option -t (default) and use a filename that describes what the key is for (e.g. id_UCloud), and don’t enter a passphrase:

ssh-keygen -t ed25519 
Generating public/private ed25519 key pair.
Enter file in which to save the key (/Users/gsd818/.ssh/id_ed25519): id_UCloud
Your identification has been saved in id_UCloud
Your public key has been saved in id_UCloud.pub
...

Windows users (skip otherwise)

On Powershell
# By default the ssh-agent service is disabled. Configure it to start automatically.
# Make sure you're running as an Administrator.
Get-Service ssh-agent | Set-Service -StartupType Automatic

# Start the service
Start-Service ssh-agent

# This should return a status of Running
Get-Service ssh-agent

On WSL
eval `ssh-agent -s`

On MombaXterm, follow the instructions here. —

Once, we have generated your SSH keys, add the key to your system:

## Now load your key files into ssh-agent
ssh-add id_UCloud

Do you get a message similar to this?

entity added: id_UCloud (gsd818@SUN1029429)

Then, copy the public key, either using cat to print the content of the file or as follows:

cat id_UCloud.pub | pbcopy 

You can now paste the public SSH key on UCloud. You’ll need to enable SSH access when you submit a job so you can SSH in.

Submit a new job on UCloud and configure SSH access

Once the job starts, the SSH command appears in the progress view and can be run locally from your terminal