mikofski / JGit4MATLAB

JGit wrapper for MATLAB
https://mikofski.github.io/JGit4MATLAB
BSD 2-Clause "Simplified" License
5 stars 3 forks source link

SSH passphrase should be encrypted #14

Open mikofski opened 11 years ago

mikofski commented 11 years ago

AES seems easiest, ideally rsa paired-key using the keys in .ssh would be perfect, but the ssh keys aren't in the correct format, and you need open-ssh to fix them

openssl pkcs8 -topk8 -inform PEM -outform DER -in private_key_file  -nocrypt > pkcs8_key

not sure if there is a programmatic way to do this with Jsch or Java?

mikofski commented 10 years ago

even if ssh keys are converted to java format, they can't be used, it's a catch-22, you can't use the keys unless you have the passphrase, but if the passphrase is encrypted using keys, then you can't get the passphrase. So best to just use AES, this works well with issue #15, since AES key can be daily, which will expire requiring passphrase to be reentered. EG: if the key is the date.