def install_key_data(self, keydata, target):
target.seek(<NUM_LIT:0>)<EOL>contents = target.read()<EOL>ssh_opts = '<STR_LIT>'<EOL>if keydata in contents:<EOL><INDENT>raise InstallError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>command = '<STR_LIT>' % self.authprogs_binary<EOL>if self.logfile:<EOL><INDENT>command += '<STR_LIT>' % self.logfile<EOL><DEDENT>if self.keyname:<EOL><INDENT>command += '<STR_LIT>' % self.keyname<EOL><DEDENT>target.write('<STR_LIT>' %<EOL>{'<STR_LIT>': command,<EOL>'<STR_LIT>': keydata,<EOL>'<STR_LIT>': ssh_opts})<EOL>
Install the key data into the open file.