@open_only<EOL><INDENT>def set_environment_variable(self, name, value):<DEDENT>
m = Message()<EOL>m.add_byte(cMSG_CHANNEL_REQUEST)<EOL>m.add_int(self.remote_chanid)<EOL>m.add_string("<STR_LIT>")<EOL>m.add_boolean(False)<EOL>m.add_string(name)<EOL>m.add_string(value)<EOL>self.transport._send_user_message(m)<EOL>
Set the value of an environment variable.

.. warning::
    The server may reject this request depending on its ``AcceptEnv``
    setting; such rejections will fail silently (which is common client
    practice for this particular request type). Make sure you
    understand your server's configuration before using!

:param str name: name of the environment variable
:param str value: value of the environment variable

:raises:
    `.SSHException` -- if the request was rejected or the channel was
    closed