DevOps Zone
DevOps Zone is brought to you in partnership with:
spacer spacer Willie Wheeler
  • Bio
  • Website
  • @williewheeler
  • spacer

Willie Wheeler is a Principal Applications Engineer with Expedia, working on continuous delivery, including build automation, test automation, configuration management and application performance management. He's also the lead author of the book Spring in Practice (Manning). Willie is a DZone MVB and is not an employee of DZone and has posted 17 posts at DZone. You can read more from them at their website. View Full User Profile

Tried Everything and SSH with PKA Still Not Working?

07.14.2012
| 3203 views |
  • Tweet
  • spacer

Recommended Links

DevOps Deployment: Applying Agile and Lean

Deployment Automation: The Basics

Continuous Delivery: Learn From The Inventors!

Beyond the Buzzwords: Continuous Delivery & DevOps

Continuous Delivery: The Book!

Like this piece? Share it with your friends:

| More

I recently ran into the situation in which I couldn’t get PKA to work when SSHing into my Ubuntu server. I checked the key pair (works fine SSHing into other servers), directory permissions, /etc/ssh/sshd_config, /var/log/auth.log, all that. Ran ssh -vvv but nothing obvious other than the server wasn’t accepting my PKA authentication. I’m not a systems guy, but I’ve set this up often enough that I couldn’t figure out for the life of me why it kept going for password authentication.

Finally found the answer: my home directory is encrypted. SSH can’t read the ~/.ssh/authorized_keys file until I log in, so it rejects the PKA auth and goes to password.

The solution is to place the authorized_keys file in an alternative location (e.g., /etc/ssh/<username>/authorized_keys), reconfigure sshd_config to use that location, set permissions, and restart the SSHD server. It’s here, under Troubleshooting.

Hope that helps somebody out. It was driving me bonkers.

Published at DZone with permission of Willie Wheeler, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Tags:
  • DevOps
  • encryption
  • pka
  • ssh
  • ubuntu
  • Linux
  • Got a story? Tell us!

Recommended Links

Deployment Automation: The Basics

DevOps Deployment: Applying Agile and Lean

FREE DevOps, Build Pipeline Tool: "Go"

Continuous Delivery: The Book!

Why Your CI Server Isn't Good Enough

gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.