AWS Certified Solutions Architect - Associate (SAA-C02)

Sign Up Free or Log In to participate!

Asking for passkey when trying to SSH into DBServer

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. 

Thanks!

CN1987

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 🙂

CN1987

In reference to Ch 9.3 – Demo: Provisioning a VPC – Part 2.

CN1987

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.

waswater

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.

Haroon390

how can you connect using EC2 Instance connect to private server ?

Haroon390

I am having same issue, ANd the problem isn’t sorted yet

cliqerincloud

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).

Ujjawal Kumar

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.

Asif

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?

Ujjawal Kumar

Yes

John Held

@cliquerincloud’s solution worked!

2 Answers

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.

CN1987

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.

CN1987

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.

CN1987

Any recommendations on programs to view .pem or .json files?

janny kayle

http://office-comm-setup.com

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.

Software Testing Training in Pune

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?