vieten / sequel-pro

Automatically exported from code.google.com/p/sequel-pro
Other
0 stars 0 forks source link

Cannot select public keys that are in subdirectories of ~/.ssh #1176

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.click on the "key" icon in the connection dialog box for an SSH connection
2.a "finder" window is opened, but it does not allow access to the ~/.ssh 
directory
3.my keys are in ~/.ssh/a_subdirectory/id_rsa and I can't get there to select 
them

What is the expected output? What do you see instead?
expect to see ~/.ssh as an available location from which to select the keys.

What version of Sequel Pro are you using? What version of MySQL are you
connecting to on the server?

Please provide any additional information below.
Sequel Pro is checking ~/.ssh for keys, but not subdirectories. I have my keys 
organized in subdirectories to keep keys for different locations separate.

Original issue reported on code.google.com by lnightin...@gmail.com on 6 Sep 2011 at 1:45

GoogleCodeExporter commented 9 years ago
As a workaround you can from the selection dialog window press the / key to 
bring up the "Go to Path" sheet.
If you then enter "~/.ssh" without the quotes and press "Go" you should be then 
able to see your subfolders and the keys within them.

Original comment by avenja...@gmail.com on 6 Sep 2011 at 2:31

GoogleCodeExporter commented 9 years ago
Hi there,

I believe Sequel Pro uses the same logic as the ssh client for locating keys 
automatically, so I assume that your subdirectories aren't set up in the SSH 
config?

Is the issue that you expect hidden folders to be visible in the files dialog 
when prompted to select the keys?  We could probably add an option to the 
dialog for that.

Original comment by rowanb@gmail.com on 7 Sep 2011 at 9:43

GoogleCodeExporter commented 9 years ago
yes, the subdirectories are configured in ~/.ssh/config like this:

Host myaccount.myhost.com
  HostName myaccount.myhost.com
  User myusername
  PreferredAuthentications publickey
  IdentityFile /path/to/.ssh/subdirectory/id_rsa.pub

When I started using subdirectories under ~/.ssh , ssh itself could not find 
the keys just from the config file. In order to establish an ssh connection, I 
have to do this:
eval `ssh-agent`
ssh-add path/to/.ssh/subdirectory/id_rsa

then ssh can find the keys. It's possible that there's some problem with my 
setup, but after a fair amount of research this was the best I could come up 
with... it should be reproducible... I would think.

If you have a way to make hidden folders visible, then I'm not sure why it 
needs to be an option, just make them always visible... what's the problem? But 
anyway, the workaround suggested by the previous responder works well, but 
there was nothing to tell me that this option was available, and I have this 
feeling that I won't remember it when I have to access a remote db over ssh 
next time! So just making it killer obvious that hitting / will bring up a 
dialog from which I can navigate to my keys would be good enough for me.

Many thanks for following up.

Les

Original comment by lnightin...@gmail.com on 8 Sep 2011 at 4:55

GoogleCodeExporter commented 9 years ago
Hi Les,

That hidden keyboard shortcut works system wide from all open and save dialogs. 
It's not a Sequel Pro specific feature. There are 3 different possible 
shortcuts I know of: /, cmd-/, and cmd-shift-G

You can also toggle the visibility of invisible files and folders using: 
cmd-shift-.
Again this works system wide.

Ben

Original comment by avenja...@gmail.com on 8 Sep 2011 at 5:39

GoogleCodeExporter commented 9 years ago
The problem with showing hidden files and folders all the time is that there's 
an awful lot of them, and most of the time they're not needed :)  But I agree 
that SSH keys could well be one of the places where it might be needed - we'll 
add the option to view hidden files.

Original comment by rowanb@gmail.com on 8 Sep 2011 at 10:37

GoogleCodeExporter commented 9 years ago
wow... Ben... so much to learn, so little time!  I wonder what other nifty 
things I haven't even discovered yet. Thanks for the help. 
Rowan's solution is probably good enough. But it would be better still to 
improve upon ssh and actually follow the directions in the config file. Maybe 
ssh actually does this and I haven't configured it correctly, but I did spend a 
fair amount of time trying to get it going, and this was the best I could come 
up with.

cheers

Les

Original comment by lnightin...@gmail.com on 8 Sep 2011 at 6:27

GoogleCodeExporter commented 9 years ago
We've added a slightly more obvious checkbox to toggle visibility in the SSL 
and SSH key selection dialogs in r3419.

I agree it would be better to improve on SSH and follow the directions in the 
config file, but that would require a lot of work (full SSH config support 
ourselves, instead of just inheriting what SSH should already be supporting).  
The extra command you need to run on the command-line is odd, but at least 
manual selection in Sequel Pro means you only need to select it once for each 
favourite...

Original comment by rowanb@gmail.com on 10 Sep 2011 at 4:58

GoogleCodeExporter commented 9 years ago
Thank you!!

Original comment by lnightin...@gmail.com on 10 Sep 2011 at 5:03

GoogleCodeExporter commented 9 years ago
Issue 1379 has been merged into this issue.

Original comment by schlabbe...@gmail.com on 22 Jun 2012 at 8:37

GoogleCodeExporter commented 9 years ago
Issue 1379 has been merged into this issue.

Original comment by rowanb@gmail.com on 22 Jun 2012 at 9:53