medis icon indicating copy to clipboard operation
medis copied to clipboard

Why Medis can not use a default SSH key in SSH tunnel

Open shiny opened this issue 9 years ago • 25 comments

I have a default key file in ~/.ssh/id_rsa, must set the key in Medis. How about try the default SSH key, is that a good idea?

shiny avatar Jan 13 '16 12:01 shiny

That's definitely a good idea!

luin avatar Jan 13 '16 12:01 luin

Yep, please add! Next to that I find it impossible to browse to ~/.ssh/id_rsa from the finder window medis shows when you click on the key symbol, as hidden folders are not shown. You might want to default to ~/.ssh when clicking on the key symbol...

Had to create a symbolic link ln -s .ssh ssh to actually be able to browse to ~/.ssh/id_rsa

ottonet avatar Jan 21 '16 05:01 ottonet

There are two ways to browse to ~/.ssh/id_rsa in the finder window before medis's supporting the default ssh key path:

  1. Command + Shift + '.' to show the hidden files.
  2. Command + Shift + G and enter ~/.ssh

luin avatar Jan 21 '16 05:01 luin

@luin thanks a lot, that's exactly what I need. I +1 for @shiny default key idea!

alexbeletsky avatar Feb 09 '16 14:02 alexbeletsky

@luin i did just that and was able to select the file however

SSH Error: Cannot parse privateKey: Unsupported key format

note am using ssh-ed25519 for keys

ctf0 avatar Oct 29 '16 20:10 ctf0

Did you select a public key or a  private key? Get Outlook for iOS

On Sun, Oct 30, 2016 at 4:13 AM +0800, "Muah" [email protected] wrote:

@luin i did just that and was able to select the file however

SSH Error: Cannot parse privateKey: Unsupported key format

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

luin avatar Oct 31 '16 01:10 luin

both gives error

ctf0 avatar Oct 31 '16 02:10 ctf0

@luin any news ?

ctf0 avatar Nov 17 '16 06:11 ctf0

@ctf0 Sorry for the late response. Could you please generate a new private key in the same format and post it here so I can debug locally?

luin avatar Nov 18 '16 15:11 luin

just follow this steps to create an Ed25519 key https://blog.g3rt.nl/upgrade-your-ssh-keys.html

ctf0 avatar Nov 19 '16 00:11 ctf0

@ctf0 It turns out ed25519 hasn't been supported by the upstream modules: https://github.com/mscdex/ssh2/issues/352. I'm going to support ECDSA format first and would like to look into the support for Ed25519 key.

luin avatar Nov 19 '16 16:11 luin

can u give any time frame for that ?

ctf0 avatar Nov 19 '16 19:11 ctf0

SSH Tunnel feature is basically unusable...

I get SSH Error: Cannot parse privateKey: Unsupported key format for all keys I tested...

pehbehbeh avatar Apr 14 '17 23:04 pehbehbeh

@pehbehbeh Are you using private keys or public keys? Private keys are required for SSH Tunnel.

luin avatar Apr 15 '17 02:04 luin

I used private keys and tried rsa and ed25519.

pehbehbeh avatar Apr 17 '17 21:04 pehbehbeh

@pehbehbeh My apologies. Ed25519 hasn't been supported yet as mentioned above.

luin avatar Apr 18 '17 01:04 luin

I also get the error with "standard" RSA key.

SSH Error: Cannot parse privateKey: Unsupported key format.

pehbehbeh avatar Apr 18 '17 10:04 pehbehbeh

How do you generate a working key? Maybe I can test that on my machine.

pehbehbeh avatar Apr 18 '17 10:04 pehbehbeh

@pehbehbeh https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/#generating-a-new-ssh-key.

luin avatar Apr 18 '17 15:04 luin

That's how I always generate SSH keys. Does not work for me... 😐

pehbehbeh avatar Apr 23 '17 11:04 pehbehbeh

@pehbehbeh Could you send me a private key you generated so I can test it.

luin avatar Apr 23 '17 11:04 luin

Hi all, because need to use Pro tools like FastoRedis which support password/keys and ssh tunnels into visible network from remote server. ssh

katamaran1993 avatar Nov 26 '17 05:11 katamaran1993

@luin After upgrading to Mojave, I'm not experiencing the same problems as everyone else here. I cannot get any SSH key to work. I generated the SSH key using the GitHub link that you provided and that still won't work. Any ideas?

intrepidws avatar May 03 '19 20:05 intrepidws

I am also waiting for a solution too

chinaliuhan avatar May 21 '19 14:05 chinaliuhan

OK so I was able to solve this. From my (limited) understanding, Mojave uses a different SSH key format by default (RFC4716) but you have to use the PEM type for it to work with Medis.

To generate a new key with this, run: ssh-keygen -m PEM -t rsa -b 4096 -C "[email protected]"

Or to convert an existing key, run: ssh-keygen -p -m PEM -f ~/.ssh/id_rsa

Hope this helps!

intrepidws avatar Oct 17 '19 12:10 intrepidws

Medis 2 already supports providing an SSH config file: https://docs.getmedis.com/settings/custom-ssh-config so closing. Free free to create a new issue if there are anything else we can improve!

luin avatar Feb 26 '23 14:02 luin