Can't find SSH public key on iOS using a-Shell (Unix iOS terminal)
0
votes
0
answers
23
views
Basically, I want to sync my repo on iPad with git, but I can't find the public key, so I can't clone the repo. I found three different guides, but none of them has worked out for me so far. I first tried following the instructions [here](https://www.warp.dev/terminus/git-clone-ssh) and [here](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) .
I generated an SSH key with
ssh-keygen -t ed25519 -C “user@example.com”
After that, I got a randomart and a message, telling me where the public key could be found. The next step, according to the guides is to double check the public key is where it's at. The first guide said to run ls ~/.ssh
and I'd see where the keys are. But I am presented with an error message. When I go ahead and run cat ~/.ssh/id_ed25519.pub
, I'm told that no file or directory can be found.
The same thing happens when I copy the entire path rather than enter the short one. The second guide said to add the key to SSH agent and to run $ eval "$(ssh-agent -s)"
> Agent pid 59566
But a-Shell tells me that the command doesn't exist. This second guide also said
> Depending on your environment, you may need to use a different command. For example, you may need to use root access by running sudo -s -H
before starting the ssh-agent
, or you may need to use exec ssh-agent bash
or exec ssh-agent zsh
to run the ssh-agent.
But neither sudo
nor exec
exist as commands.
I found a [third guide](https://bianshen00009.gitbook.io/a-guide-to-a-shell/basic-tutorials/configure-lg2-for-version-controlling) , but it also didn't tell me how to get the public key, only that I should link it with git. I tried ssh-agent
, and I'm told that I can now run ssh-add
, so I tried that, but it didn't work.
In the list of commands I got from help -l
, I saw ssh-copy-id
So I tried that and ran ssh-copy-id ~/.ssh/id_ed25519
, but that didn't work, tried it again ssh-copy-id ~/.ssh/id_ed25519.pub
. That didn't work either. I got Error: ssh: Could not resolve hostname
and nodename nor servnamer provided, or not known
.
I'm not sure what I'm missing here. I've done the same on Android and I got the repo to sync, but iOS has me stumped.
Asked by muffin
(1 rep)
Jul 2, 2025, 11:26 PM