Ask Your Question
0

how to copy ssh public key from one agent to other agent's authorized_keys file

asked 2016-02-15 16:47:14 -0500

shagone gravatar image

I want to copy ssh public key(idrsa.pub) from one agent to the other agent's authorizedkeys file so that I could establish a ssh key based authentication between the agents.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-02-18 02:19:34 -0500

rajeevsharma gravatar image

updated 2016-02-18 02:21:16 -0500

Hi shagone,

According to your problem statement you would need to use export and collect resource. It would help you to exchange information between two(or more) agent nodes. Your puppet.conf file must have storeconfigs = true in master section.

Export resource could be used on the node where you want to expose the information(letting other agent know about the public key). The collector sigils could be used in the manifest where you want to store it in your authorizedkeys file. Please check this out: https://docs.puppetlabs.com/puppet/latest/reference/langexported.html

https://docs.puppetlabs.com/puppet/latest/reference/lang_collectors.html

I hope this would help you to resolve your problem. Cheers!!!

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-02-15 16:47:14 -0500

Seen: 102 times

Last updated: Feb 18 '16