I believe it is on the driver side, top of the engine block, below the point where the air filter canister connects to the thottle body. look for a single bolt thru a sensor (diameter of a quarter) and wires attached.
Do I relpace the snser from under the hood or do I have to get under the car?
In a 1998 Subaru Legacy, the knock sensor is located on the top of the engine block and to the left of the engine. More specifically, it is under the left rear intake manifold runner.
top of front of engine, under alternator
The 2001 Subaru Legacy has a flat 4 engine.
The 2014 Subaru Legacy has a flat 4 engine.
The 2009 Subaru Legacy has a flat 4 engine.
The 2013 Subaru Legacy has a flat 4 engine.
The 2010 Subaru Legacy has a flat 4 engine.
The 2005 Subaru Legacy has a flat 4 engine.
The 2008 Subaru Legacy has a flat 4 engine.
The 2002 Subaru Legacy has a flat 4 engine.
The 2003 Subaru Legacy has a flat 4 engine.
The 2012 Subaru Legacy has a flat 4 engine.