(cmd)
Helper function.
    Runs a command with SSH agent forwarding enabled.

    Note:: Fabric (and paramiko) can't forward your SSH agent.
    This helper uses your system's ssh to do so.
Helper function.
    Runs a command with SSH agent forwarding enabled.
Helper function . Runs a command with SSH agent forwarding enabled .
def sshagent_run(cmd):
    """
    Helper function.
    Runs a command with SSH agent forwarding enabled.

    Note:: Fabric (and paramiko) can't forward your SSH agent.
    This helper uses your system's ssh to do so.
    """
    # Handle context manager modifications
    wrapped_cmd = _prefix_commands(_prefix_env_vars(cmd), 'remote')
    try:
        host, port = env.host_string.split(':')
        return local(
            "ssh -p %s -A %s@%s '%s'" % (port, env.user, host, wrapped_cmd)
        )
    except ValueError:
        return local(
            "ssh -A %s@%s '%s'" % (env.user, env.host_string, wrapped_cmd)
        )
def sshagent_run ( cmd ) : # Handle context manager modifications wrapped_cmd = _prefix_commands ( _prefix_env_vars ( cmd ) , 'remote' ) try : host , port = env . host_string . split ( ':' ) return local ( "ssh -p %s -A %s@%s '%s'" % ( port , env . user , host , wrapped_cmd ) ) except ValueError : return local ( "ssh -A %s@%s '%s'" % ( env . user , env . host_string , wrapped_cmd ) )