views:

145

answers:

1

I'm trying to find a way to decrypt an encrypted file on a 'virgin' EC2-instance. These EC-instances I use (Ubuntu Lucid) only hold my AWS-created public ssh-key. If can use this to decrypt a file, I can feed it encrypted files (for example a bash-script holding a password to my subversion-repository).

So, my question, can I use my ssh-key to encrypt/decrypt a file?

Thanks!

A: 

You can use a public key to encrypt a file but you will need the corresponding private key to decrypt it. So, yes, you should be able to use your ssh-key to encrypt/decrypt a file, as long as you have access to both the public and private key.

klausbyskov
Thanks for the quick reply!Can you give an example of the command I have to give (I'm on linux) on how to do this?sorry, I'm in the dark here...