amoussard / sftp-deployment

Spend less time managing file transfers and more time coding. SFTP support for Atom.io to send and receive files directly in your server.
MIT License
76 stars 44 forks source link

How is one meant to specify a password for the ssh public key? #20

Open felixphew opened 10 years ago

felixphew commented 10 years ago

I keep getting errors like Uncaught Error: Encrypted private key detected, but no passphrase given. How does one specify a passphrase for the private key? Or is there some other kind of key that doesn't need a passphrase? Am I missing something?

felixphew commented 10 years ago

My config is:

{
  "type": "sftp",
  "host": "ftp.m*************r.com.au",
  "user": "mfftp@m*************r.com.au",
  "port": "2***1",
  "remote_path": "/",
  "ssh_key_file": "/Users/f*******w/.ssh/id_rsa"
}
scottyinzeo commented 10 years ago

Having the same issue on OS X Yosemite 10.10.

felixphew commented 10 years ago

Yep, it seems to happen on all platforms. Any workaround to specify a passphrase yet?

markorosic commented 10 years ago

+1

JonathanPorta commented 10 years ago

@felixphew You asked if there was a key that doesn't require a passphrase. You can always remove the passphrase from your private key by doing something like this: openssl rsa -in privateKey.pem -out newPrivateKey.pem

felixphew commented 10 years ago

Yes, I know that now, but for security I prefer to keep my private keys encrypted. Also, it isn't a pem, and as far as I can see from looking at your code it doesn't need to be.

jdconley commented 10 years ago

Having this issue as well, and don't want to decrypt my keys.

JonathanPorta commented 10 years ago

@felixphew I don't disagree with you on keeping a passphrase on my privates. Nor, do I disagree that this plugin should be aware of the need to unlock a key for use. I was just responding to your second question regarding whether or not there was a type of key that didn't require a password.

Personally, I want to use a private key with this plugin over saving a plain text password in the config file. I would prefer that this plugin was smart enough to ping the system's keystore which could then ask me to unlock the key. Then it could stay unlocked for the duration of that session.

felixphew commented 10 years ago

@JonathanPorta that would be the best way, I think. Or, better yet, if the passphrase had already been saved (using ssh-add -K), it could just use that. Or the system keychain.

felixphew commented 10 years ago

You know what? Atom needs its own keychain. A standard interface for storing passwords, just like the plugin linter is a standard interface for linter plugins. I am unfortunately not nearly skilled enough to take something like this on but I could certainly help. Any takers?

amoussard commented 9 years ago

Hi guys,

Sorry for the long period of inactivity.

We are currently working on a new version : better code, more stable, and bug fixes.

For this, I will implement a prompt if the passphrase is not in the config file. This feature will be developed after the next release (1.1.0).

Thank you for using our work ! :)

repat commented 8 years ago

amoussard removed this from the 1.1.0 milestone on 27 Jul 2015

Does this mean that it's implemented or it's not coming in the next version? This is one of the few things that keeps me from using Atom instead of Sublime