Recent Macs are using unix beneath the hood (apparently based on BSD unix). Both openssh and apache should be available.
Note that I am not a Mac user, and I do not have any experience setting these up. -- AT&T dsl; Speedstream 5100b modem; Zyxel NBG334W router; openSuSE 11.0; firefox 3.0.11