In line with the demo – after I edit my key pair and try to SSH to my DBServer, it asks me for a passkey for my key pair. I know that this is only part of the demo, but I want to see why and how to solve this should it come up in the future.
Solved: with this article: https://serverfault.com/questions/851999/using-pem-file-from-aws-asking-for-passphrase
I changed file encoding to ANSI and double-checked I’m copying and pasting cert contents (from Windows to connected EC2 Linux) in the same exact form and there are no extra characters before/after the pasted content. Worked.
Just ran through the video again (5th time doing it, so at least I am ready to create one from memory) and I converted to ANSI encoding, double checked that I am copying and pasting cert contents from windows to a running EC2 instance in the AWS console. No extra characters before or after, got the same result. Asking for passphrase.
Just figured it out, it must have been the way that I am viewing the key pair file. Went line by line and copied it over. Then the keypair didn’t need a passphrase and connected to DB server.
Any recommendations on programs to view .pem or .json files?
Software Testing is a technique to check whether the genuine programming item coordinates with anticipated necessities and to guarantee that product item is without defect. It includes execution of programming/framework parts utilizing manual or mechanized devices to assess at least one properties of interest. The motivation behind programming testing is to recognize mistakes, holes or missing necessities as opposed to real prerequisites.
Just to edit a bit, I meant a "passphrase" when I am trying to connect from a test webserver over to a test database server. The DB server is set up with SSH port in the security group, but when I try to SSH from my webserver over to DB after creating and editing my KP, asks for a passphrase. Would love any insight possible 🙂
In reference to Ch 9.3 – Demo: Provisioning a VPC – Part 2.
And to also confirm before someone asks — I had already elevated to "sudo su" and used the chmod 400 commands before trying to connect to the DB instance.
Lecture on provisioning a VPC, part 2 of DEMO: I have the same problem. I followed the video exactly, just using EC2 Instance Connect, not local terminal.
how can you connect using EC2 Instance connect to private server ?
I am having same issue, ANd the problem isn’t sorted yet
For those seeing the passphrase issue, try the same steps but using vi instead of nano. For example, if you ran nano myKeys.pem run vi myKeys.pem. Next, copy the contents from the actual .pem file using keyboard shortcut (Command + C or CTRL + C). Next, in the open vi editor, press ESC and type this ":set paste" (without the double quotes). Then go ahead and use keyboard paste shortcut (Command + v or CTRL + v). To save and exit vi, hit ESC again and type ":wq" (without the double quotes).
Similar issue in the same section. Created new security group with 4 inbound rules, added to the database server. Now logged in the webserver terminal and trying to ping the DBserver. Unable to ping or connect.
when you select dbserver in ec2 instance — are you seeing in security tab, the newly created security group & inbound rules — is it showing the appropriate ports, protocol, source cidr?
@cliquerincloud’s solution worked!