code: def get_pubkey(self):
          '''
          Return the key string for the SSH public key
          '''
          if '__master_opts__' in self.opts and \
                  self.opts['__master_opts__'].get('ssh_use_home_key') and \
                  os.path.isfile(os.path.expanduser('~/.ssh/id_rsa')):
              priv = os.path.expanduser('~/.ssh/id_rsa')
          else:
              priv = self.opts.get(
                      'ssh_priv',
                      os.path.join(
                          self.opts['pki_dir'],
                          'ssh',
                          'salt-ssh.rsa'
                          )
                      )
          pub = '{0}.pub'.format(priv)
          with salt.utils.files.fopen(pub, 'r') as fp_:
              return '{0} rsa root@master'.format(fp_.read().split()[1]f get_pubkey(self):
          '''
          Return the key string for the SSH public key
          '''
          if '__master_opts__' in self.opts and \
                  self.opts['__master_opts__'].get('ssh_use_home_key') and \
                  os.path.isfile(os.path.expanduser('~/.ssh/id_rsa')):
              priv = os.path.expanduser('~/.ssh/id_rsa')
          else:
              priv = self.opts.get(
                      'ssh_priv',
                      os.path.join(
                          self.opts['pki_dir'],
                          'ssh',
                          'salt-ssh.rsa'
                          )
                      )
          pub = '{0}.pub'.format(priv)
          with salt.utils.files.fopen(pub, 'r') as fp_:
              return '{0} rsa root@master'.format(fp_.read().split()[1])
docs: Return the key string for the SSH public key