O'Reilly logo

Salt Cookbook by Anirban Saha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required