teuthology: remove previous test ssh keys

Updated the ssh-keys task to cleanup
any left-over keys from previous tasks
(indicated by the user being 'ssh-keys-user').
Also, some of the functions in the ssh_keys task seem
like they could be useful in general.
This patch refactors them into misc.py.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewd-by: Sam Lang <sam.lang@inktank.com>
(cherry picked from commit 4258807bfcedb190155d690ab5e059cd9670e90d)
teuthology: fix for ssh-keys-task

Resolves an issue where we
were not properly escaping the generated
public key when doing matches against it.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewd-by: Sam Lang <sam.lang@inktank.com>
(cherry picked from commit 826ad0d816b1820fb444d33aff0019652cc0ade3)
added UserKnownHostsfile to ssh config

Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
(cherry picked from commit 7cb59d3b8274e61cb610501c24ca1520d09c2d93)
set permission for config file

Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
(cherry picked from commit bc9f502c601c15b5a5676a8f07d65a828d3862e5)
adding a newline to auth key data

Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
(cherry picked from commit 0e3038650288a1ecdede6dd298e57ed1fd739a31)
Use authorized_keys2 instead of authorized_keys

Instead of going through the trouble of adding/removing lines
from authorized_keys which has all our normal keys in it, instead
push keys to the unused authorized_keys2 file which makes the key
management significantly simpler as that file can just be wiped
out each time instead of worrying about preserving contents.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
(cherry picked from commit 32c82347259d51d11dcb489149ce8557c9181e6f)