louisdh / openterm

OpenTerm, a sandboxed command line interface for iOS
Other
1.63k stars 249 forks source link

Private keys #130

Open h3nchman opened 6 years ago

h3nchman commented 6 years ago

Am I am missing something or can this not use them?

holzschu commented 6 years ago

Which version are you using, and what command are you trying?

DavidNielsen commented 6 years ago

Continued from Twitter here: https://twitter.com/gnomeuser/status/996825558150533121

I believe I am seeing this issue as well.

To reproduce:

  1. Open OpenTerm.
  2. Type ssh-keygen.
  3. Hit enter (to confirm .ssh/id_rsa as the key location).
  4. Enter passphrase in the dialog box.

OpenTerm now just sits forever, you cannot break out of the loop and no amount of waiting generates the ssh key.

Additionally, while it is spinning the user can repeatedly hit the backspace key (at least on a physical keyboard) to remove any text on the screen which feels unintentional (and also a separate bug).

holzschu commented 6 years ago

I just tried that, and I cannot reproduce this behaviour (it generated the key, and gave me back the prompt). Is this behaviour still present with version 2.0?

DavidNielsen commented 6 years ago

Happens both with the latest beta build and the 2.0 final. However the plot thickens a bit. I started testing other commands and discovered the following:

Runs without hanging: dig, ping, host, clear, uname, uptime, whoami, echo foo

Hangs when run: ssh-keygen, ls, echo foo > foo.txt

Given the intriguing outcome of the echo test I would suspect that writing to the filesystem is the problem, that doesn’t exactly explain the ls failure but it’s my best guess right now.

In case it matters this is on an iPad Air running iOS 11.4 (PB 5).

Edit:

After installing 11.4 PB6 I discovered that mkdir and ls works but only if run before trying ssh-keygen, once ssh-keygen is run they all hang. Additionally after the reboot I also had foo.txt from the prior test so racing or locking issue? This is getting interesting.

holzschu commented 6 years ago

Thanks for the report and tests. I still can't reproduce, but it helps.

Does it also hang if you tell ssh-key gen to save the key in another place (instead of .ssh/id_rsa)?

DavidNielsen commented 6 years ago

Tried ~/id_rsa and ~/foo/id_rsa, same result. I also tried switching the storage provider from iCloud to On this iPad just in case the problem was related to the storage provider, no dice.

weekez78 commented 6 years ago

Sorry, do i need to do something here? Is this to do with what i was faffing about with? I made keys that all work.. ps i really have no clue what i did.. i guess it jist looked right! Although i could have started world war 111 sorry people

weekez78 commented 6 years ago

I defo did saving it else where :-b ops (on what i did) x

holzschu commented 6 years ago

I have managed to reproduce the bug, with the new app from the AppStore. It freezes, as you said, between the first and the second time it asks for the passphrase (I should have noticed that earlier in your post). That narrows it down quite a lot. I'm investigating.

ksbex commented 6 years ago

I'm seeing the same issue. Since it seems to work for some users, I thought maybe creating a blank id_rsa file first might change things. It prompted that id_rsa already existed and asked to overwrite (y/n). I had to hit Y like 10 times before it registered the input (using a bluetooth keyboard). Then it prompted me for my passphrase but still hangs just like before.