Use WriteFile when possible in ssh.py
Use WriteFile when possible in ssh.py

This is an additional patch to the SSH patch series
which simplifies the handling of public SSH keys by using
the utility function WriteFile as often as possible.
As it is a mess to merge it back into the series,
I am sending this as an additional patch at the end of the
series.

Signed-off-by: Helga Velroyen <2d0126b1ec6f9ec5cbec4a7012aa14faeaef10f5@google.com>
Reviewed-by: Petr Pudlak <9d19625f8ee825a2c398462ed335cbcf98f79c32@google.com>

ganeti-github-testing/ganeti-test-1,mbakke/ganeti,yiannist/ganeti,yiannist/ganeti,andir/ganeti,yiannist/ganeti,andir/ganeti,ganeti-github-testing/ganeti-test-1,andir/ganeti,leshchevds/ganeti,dimara/ganeti,mbakke/ganeti,apyrgio/ganeti,bitemyapp/ganeti,leshchevds/ganeti,ganeti/ganeti,onponomarev/ganeti,grnet/snf-ganeti,ganeti/ganeti,dimara/ganeti,mbakke/ganeti,onponomarev/ganeti,ganeti/ganeti,leshchevds/ganeti,grnet/snf-ganeti,bitemyapp/ganeti,apyrgio/ganeti