Fix ssh setup

Create ~/.ssh and set perms before creating ~/.ssh/environments.