What this guide covers
When you finish, this machine can pull and push your repositories over SSH, and you can revoke this one key at any time. You need: a GitHub account and access to the browser inside the remote desktop.
Steps
Set your commit identity first
The command line tools include git, so it is enough that
git --versionprints something. Then set the commit identity for this machine:git config --global user.name "Your Name"andgit config --global user.email "your email". The email has to match one registered on your GitHub account for commits to be attributed to you.Generate a new key on this machine
Do not copy the private key from your own computer over the remote clipboard or file transfer: that key usually opens your other servers as well. Use one key per machine, so that if it is lost or the rental ends you revoke only that one. Following the official GitHub docs:
ssh-keygen -t ed25519 -C "Contact support"We suggest setting a passphrase when prompted. You can change the comment to something that identifies this machine, which makes the key easier to tell apart on GitHub later.
Have the keychain remember the passphrase
The official docs start with
eval "$(ssh-agent -s)"and then put this in~/.ssh/config:Host github.com AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/id_ed25519Then run
ssh-add --apple-use-keychain ~/.ssh/id_ed25519. If you set no passphrase, the docs say to remove theUseKeychainline and leave out--apple-use-keychain.Add the public key to your GitHub account
pbcopy < ~/.ssh/id_ed25519.pubcopies the public key to the remote Mac's clipboard. Then log in to GitHub in the browser inside the remote desktop, go to Settings → SSH and GPG keys → New SSH key, and paste it. The whole process happens on the remote Mac, so the public key never has to pass through your local computer. Give it a title that says which machine it is and the date you added it.Test the connection
Run
ssh -T Contact support. The first time, you are asked to confirm the host fingerprint; check it and type yes. When you seeYou've successfully authenticated, but GitHub does not provide shell access.with your username in it, the connection works. See the official testing instructions.Narrow the access if you only need a few repositories
An SSH key added to your account can reach every repository under that account. If this machine only runs one or two projects, consider a GitHub deploy key (valid for a single repository) or a fine-grained access token. Follow the official GitHub docs for the details. This is especially worth doing on a machine where an agent commits code automatically.
Revoke and delete before the rental ends
The machine is reclaimed and reinstalled after the rental ends, but do not rely on the reinstall for your security. Before handing it back: delete this public key on GitHub's SSH and GPG keys page, delete the matching private key file from
~/.sshon the machine, and confirm that all local commits have been pushed.
FAQ
After a restart, the first git operation asks for the passphrase or fails. Why?
The keychain unlocks only after you log in to the desktop. After a restart, log in to the system once through the remote desktop, then run git. A background job that starts before login runs into the same thing.
Can I use HTTPS with a token instead?
Yes, GitHub supports that as well. The same advice applies: create a token for this machine only, give it the minimum permissions, set an expiry, and revoke it on GitHub when the rental ends.
Can the platform see my code or my private key?
The platform runs the necessary operational and security monitoring (such as processes, network connections and configuration state). It does not record the screen or the content of your business data, and it does not proactively access what is on the device. See this explanation. For confidential projects, check your own organization's requirements first.
Related
- How to move a project from your own computer to a remote Mac mini using git
- How to store env vars and API keys for multiple projects on a remote Mac mini
- Can the rental provider see the code on my machine?
- What to do on day one with a rented remote Mac mini
- Remote Mac mini for heavy Claude Code use: an always-on workstation, not account insurance
Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support