Fixes for ssh session environment variables