There is a note someplace for doing this through winscp… (Permission denied when editing .yaml thru WinSCP)
Basically, if you are logging on as the user “pi”, then you need to switch to the user “homeassistant” or a user with greater permissions to make the changes. I connect via SSH as “pi”, then :
sudo vi /home/homeassistant/.homeassistant/configuration.yaml
In this case, I am useing vi as my editor. You could also use nano or vim.