@contextmanager<EOL>def ssh_config(ssh_user, ssh_private_key_file):
try:<EOL><INDENT>ssh_file = NamedTemporaryFile(delete=False, mode='<STR_LIT>')<EOL>ssh_file.write('<STR_LIT>')<EOL>ssh_file.write('<STR_LIT>' % ssh_private_key_file)<EOL>ssh_file.write('<STR_LIT>' % ssh_user)<EOL>ssh_file.close()<EOL>yield ssh_file.name<EOL><DEDENT>finally:<EOL><INDENT>with ignored(OSError):<EOL><INDENT>os.remove(ssh_file.name)<EOL><DEDENT><DEDENT>
Create temporary ssh config file.