Use hostname() instead of localhost to avoid ssh annoyances.