Add the code from .profile to your own ~/.profile.
This is slightly different from the StackOverflow answer: Start ssh-agent on login. If noclobber has been set in your environment, then writing to .ssh/environment will fail. In this version, the file is overwritten with >|. See why 'cannot overwrite existing file'?.