Your example should work. From your explaination it is not clear to me if you only have problem with variable substitution or something with your password/key since you do mention that too.
To use ssh without password prompt you'll have to create and exchange keys that have been generated without entering a password while doing so (as side note).
As script there is no difference. I asked 2 times already - here is the third and last time: Post your error output you get, thank you.
Guessing around and asking the same stuff all the time is getting tideous
So on the 10.180.8.236 host, can you open this file? get any error on this opening?
May be this file locked by the remote host.Otherwise command must be work success