Ask Your Question

ssh_authorized_key - autologin

asked 2013-06-04 00:37:15 -0600

JohnSmith gravatar image

updated 2013-06-04 07:17:07 -0600

llowder gravatar image


I'm learning with the "Puppet Labs Learning VM". I don't know how to solve this problem only with ssh_authorized_key:

Write and apply a manifest that uses the ssh_authorized_key type to let you log into the learning VM as root without a password. Youʼll need to have an SSH key.

  1. Does that mean, that I have to write the Manifest at the Client-PC?

  2. Does that mean, that I have to create a new pair of keys for the Client and include the Client's public key into the servers "authorized_keys" file?

So I don't quite understand how ... (more)

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2013-06-04 07:32:42 -0600

llowder gravatar image

In order to complete this part of the tutorial, you have to know how to enable passwordwordless login via ssh. Google has a lot of information on how to do this.

Once you have determined how to set this up outside of puppet, it is pretty straight forward doing it inside puppet.

This exercise is about setting up the root account with passwordless login, so you would need to either locate an existing SSH key in root's home and copy the appropriate key to where you connect from, or generate a new key and use that.

Where you write ... (more)

edit flag offensive delete link more


I removed an OP "answer" that was really just a comment about trying llowder's solution.

Ancillas gravatar imageAncillas ( 2013-06-04 17:55:22 -0600 )edit

ssh_authorized_key is a Puppet resource that is used to manage the list of .ssh authorized keys. In Ubuntu, this file is in $HOME/.ssh/authorized_keys. This file will contain public ...(more)

Ancillas gravatar imageAncillas ( 2013-06-04 17:59:11 -0600 )edit

Thanks a lot Ancillas!

JohnSmith gravatar imageJohnSmith ( 2013-06-06 15:17:10 -0600 )edit

answered 2013-06-06 15:16:17 -0600

JohnSmith gravatar image

Thanks a lot for the nice answers!

edit flag offensive delete link more


If you believe an answer has resolved your question, please mark it as accepted by clicking the green check mark.

supercow gravatar imagesupercow ( 2013-06-09 11:59:28 -0600 )edit

suggestion: ssh_authorized_key { "sshclient@sshclient-PC": ensure=>present, user=>"root", type=>"ssh-rsa", key=>"public key of the SSH-Client", } I created the ssh-key-pair manually on the SSH-Client's PC and then used the ...(more)

JohnSmith gravatar imageJohnSmith ( 2013-06-09 12:51:33 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-06-04 00:37:15 -0600

Seen: 1,802 times

Last updated: Jun 06 '13