Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've installed vsftpd on an Ubuntu EC2 instance but I'm not sure where the certificate files are to enter into vsftpd. The documentation says I need to add the following lines:


However, when I try and login using the normal ec2-keypair.pem file I get the message invalid privatekey

share|improve this question
Do you mean FTPS? SFTP runs over SSH, and is unrelated to FTP. – Steve Mayne Mar 21 '11 at 13:22
Yes, I want to use FTPS but don't I need to add the RSA key details to vsftpd.conf? I don't know where they're actually located on a standard Ubuntu EC2 instance. – Ewan Heming Mar 21 '11 at 13:32
Figure out what exactly you want then revise your question... VSFTP has nothing to do with the ec2-keypair.pem file, but can be used for SFTP as Steve mentioned. – Jeremy Bouse May 9 '11 at 21:47

You should ideally generate a new keypair. There's lots of stuff via google about how to do that with openssl. If you want to try using the ec2 keypair, which would mean placing your ec2 private key on this server (which I don't recommend for security reasons) you could try placing the key in the file ~ec2-user/.ssh/authorized_keys as the public key, and the ec2 private key you have on your own machine as the private key.

Again, not recommended, since this would mean that someone who had sufficient access to this server could then get the private key, and log into any of the ec2 instances you had brought up using this keypair.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.