code: def gen_key(path):
      '''
      Generate a key for use with salt-ssh
      '''
      cmd = 'ssh-keygen -P "" -f {0} -t rsa -q'.format(path)
      if not os.path.isdir(os.path.dirname(path)):
          os.makedirs(os.path.dirname(path))
      subprocess.call(cmd, shell=Truef gen_key(path):
      '''
      Generate a key for use with salt-ssh
      '''
      cmd = 'ssh-keygen -P "" -f {0} -t rsa -q'.format(path)
      if not os.path.isdir(os.path.dirname(path)):
          os.makedirs(os.path.dirname(path))
      subprocess.call(cmd, shell=True)
docs: Generate a key for use with salt-ssh