Performing SSH authentication tasks

Managing SSH keys and the associated files is a key task that needs to be performed in most infrastructure at present to facilitate a number of functions with remote access between servers. Although this task can be achieved by propagating files to the minions using the file module, Salt has a better way to do it using SSH-specific modules. In this recipe, you will learn how to use these modules.

How to do it...

  1. Configure two minions called salt-minion and backup-server. Configure the server_type grain of salt-minion to have the value app and the backup server's value to be backup.
  2. Create a new state called sshauth, and create two files inside this directory called pubkey.sls and known_hosts.sls. Also create a ...

Get Salt Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.