I am well aware of how to upload .p12 cert for iOS push notifications - via Heroku or Back4App. However my Parse server is hosted on AWS ec2 instance with Bitnami image. Hence I can only interact with my server via my Terminal. I tried uploading the PFX (.p12) from my local machine via scp something like this:

scp -i /Path/To/My/Certificates.p12 ubuntu@server_ip: /home

but I am receiving the following error in Terminal:

Load key "/Path/To/My/Certificates.p12": invalid format ubuntu@server_ip: Permission denied (publickey).

There is unfortunately poor documentation regarding how to upload p12 files without GUI's like Back4App/Heroku.

So I would be very glad if someone could assist me on this matter.



SCP is over SSH - so if you know how to log into your instance using SSH then that's half the battle

the -i keyword is a path to your private keyfile, not the file you want to upload, which should be in /Users/myname/.ssh/id_rsa where "myname" is your account.

how do you normally access the VM over SSH? You will use those creds with scp


This should work for you:

scp -i myKey.pem.txt /Path/To/My/Certificates.p12 ubuntu@server_ip:/home

| improve this answer | |
  • I normally access with ssh like this: ssh -I myKey.pem.txt ubuntu@server_ip. To be frank, I did try something like this: ssh -I myKey.pem.txt /Path/To/My/Certificates.p12 ubuntu@server_ip: /home but that didn't go well – Hudi Ilfeld Jun 20 '19 at 12:38
  • I've edited my original answer to conatin something that should work for you – Owensteam Jun 20 '19 at 12:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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