def remote_server_command(command, environment, user_profile, **kwargs):
if environment.remote_server_key:<EOL><INDENT>temp = tempfile.NamedTemporaryFile(mode="<STR_LIT:wb>")<EOL>temp.write(environment.remote_server_key)<EOL>temp.seek(<NUM_LIT:0>)<EOL>known_hosts = temp.name<EOL><DEDENT>else:<EOL><INDENT>known_hosts = get_script_path('<STR_LIT>')<EOL><DEDENT>binds = {<EOL>user_profile.profiledir + '<STR_LIT>': '<STR_LIT>',<EOL>known_hosts: '<STR_LIT>',<EOL>get_script_path('<STR_LIT>'): '<STR_LIT>'<EOL>}<EOL>if kwargs.get("<STR_LIT>", None):<EOL><INDENT>binds[environment.target] = '<STR_LIT>'<EOL>del kwargs["<STR_LIT>"]<EOL><DEDENT>kwargs["<STR_LIT>"] = binds<EOL>try:<EOL><INDENT>web_command(command, **kwargs)<EOL><DEDENT>except WebCommandError as e:<EOL><INDENT>e.user_description = '<STR_LIT>'<EOL>raise e<EOL><DEDENT>
Wraps web_command function with docker bindings needed to connect to
a remote server (such as datacats.com) and run commands there
(for example, when you want to copy your catalog to that server).

The files binded to the docker image include the user's ssh credentials:
    ssh_config file,
    rsa and rsa.pub user keys
    known_hosts whith public keys of the remote server (if known)

The **kwargs (keyword arguments) are passed on to the web_command call
intact, see the web_command's doc string for details