def _spec(info):
    """Create a server specification string from an info structure.
    """
    result = "%(user)s:*@%(host)s:%(port)s" % info
    if "unix_socket" in info:
        result += ":" + info["unix_socket"]
    return result