The shape tools have 3 different drawing modes:
- Shape Layers
- Fill Pixels
The first 2 create vector shapes, whereas the last creates raster shapes. If you select
Fill Pixels you can uncheck
Anti-alias, which will then do what you want.
Alternatively, for horizontal and vertical lines, you can use the column and row selection tools. And for other angles, you can use the pen tool to create the path and stroke the path using the pencil tool.
If your problem isn't antialiasing (which is usually a good thing) but rather blurry lines where you want them to be crisp, then you just need to make sure your lines/paths are aligned with the pixel grid. But to do this, you'll need change your line/path's reference point to one of the corners instead of the center; otherwise, the line will be drawn between pixels, causing each adjacent pixel to be partially filled rather than a single pixel being completely filled.