holzschu / holzschu/a-shell

publickey authentication for ssh no longer working

Open
#660 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
Perl
Stars
3.9k
Forks
213
Avg merge
1m
Merged PRs (30d)
1

Description

### Issue

- I was able to ssh using keys until I deleted the app and reinstalled it.
- I'd do this using `.ssh/config` on a-shell, now I get permission denied.
- Doing `ssh -i .ssh/ user@host` prompts for password.

### Steps

```bash
Documents]$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/private
/var/mobile/Containers/Data/Application/1A5B4
A86-B395-465D-A82C-EB57C3968223/Documents/.ss
h/id_rsa): .ssh/ir
Reply is: .ssh/ir.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in .ssh/ir
Your public key has been saved in .ssh/ir.pub
The key fingerprint is:
SHA256:2ekTVdq1BRurgKAAUXdIsZ5SB4cTMAD0T8iF7l
KaMC0 mobile@iPhone
The key's randomart image is:
+---[RSA 3072]----+
|B*=oB*+ +.o|
| o=** . . + =o|
| ..++o. . . o +. |
|E .=oo o + . |
|.o* o. S + . |
| + o . . |
| . o |
| . |
| |
+----[SHA256]-----+
[Documents]$ ls.ssh
ls.ssh: command not found
[Documents]$ ls .ssh
config ir ir.pub
Documents]$ scp .ssh/ir.pub iridium@192.168.
0.209:~/.ssh
The authenticity of host '192.168.0.209 (192.
168.0.209)' can't be established.
ED25519 key fingerprint is SHA256:oSqYqE4r3wf
OyhMupdNyfEadeUKiQ+tO5jhYWehhQII.
This key is not known by any other names
Are you sure you want to continue connecting
(yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.0.209' (E
D25519) to the list of known hosts.
(iridium@192.168.0.209) Password:
ir.pub 100% 567 74.5KB/s 00:00
[Documents]$ ssh iridium@192.168.0.209 'cat ~/.ssh/ir.pub > ~/.ssh/authorized_hosts; cat a
uthorized_hosts'
(iridium@192.168.0.209) Password:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCrjqVEg
OWTKDibuMS9JbyLbky7HwGc10yHmPwDabLJRDzCBzD3Na
kkxFke8tcllbGe9VrZxRHImKOSznYswK0VyWwxNhWHgRM
IsLAIw6EangIlwOMI53xUySd3pY8QHjVTp3ec/L5O9o3m
70Vzn8yqjo6hhP3aS0lU4eyXHyIODwQabvCqwHUDZqFRuJFZwsdBT36YxxPbCDBDjkJmdVaMEf+HAMHCVN4KoDW2Ff
/XPMfonGSEguJH1f4eMk8fMrnzfR/T/rUvPmT/yLv6sKw
HZT9ePkWoTOT7UWfxEPSHWRZqxq0BnvQNwYsahF1lt9oq
/bC66QlcdYUuLtL+U/vB4LHsJY/4tPN8vSqcLjiHeMGl+
3lkKw8NQ+dDXQ1o2YgRH50hYv6iGuammE2wmguRjFb54/
TwEx3CiySVdSPv2RFgpQsM1E+u2FJvOe69SvOovvpGnJK
UJuZbw0mdXo1z0XZokK81y7d9B99mK6OHkI2jJJeJUn6y
VjvIYgjARS0= mobile@iPhone
[Documents]$ cat .ssh/config
host iri
user iridium
hostname 192.168.0.209
identityFile ~/Documents/.ssh/ir
preferredAuthentications publickey
Documents]$ ssh iri
iridium@192.168.0.209: Permission denied (pub
lickey,password,keyboard-interactive).
[Documents]$ ssh -i .ssh/ir iridium@192.168.0
.209
(iridium@192.168.0.209) Password:
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.