From ŝlosi (“to lock”) + -ilo and directly from German Schlüssel.
ŝlosilo (accusative singular ŝlosilon, plural ŝlosiloj, accusative plural ŝlosilojn)