Commit Graph

10 Commits

Author SHA1 Message Date
Sandon Van Ness
f6270a7fb0 Wipe out existing id_rsa.pub and id_rsa before pushing ssh keys
A very simple change. Just touch a file first (to create it if it
doesn't yet exist so the delete doesn't error out) and then delete
it before pushing the keys to the file. This should avoid the
id_rsa.pub and id_rsa files from getting messed up due to previous
runs which were interrupted or failed (or if those files exist for
some reason). This appears to be what was causing breaking in the
ceph-deploy nightlies.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-06-21 14:45:36 -07:00
Sandon Van Ness
0ff2e42e7c 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>
2013-06-17 16:24:37 -07:00
tamil
0e30386502 adding a newline to auth key data
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2013-06-13 17:13:09 -07:00
tamil
bc9f502c60 set permission for config file
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2013-05-16 13:14:06 -07:00
tamil
7cb59d3b82 added UserKnownHostsfile to ssh config
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
2013-05-16 09:49:40 -07:00
Joe Buck
826ad0d816 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>
2013-04-08 11:54:55 -07:00
Joe Buck
4258807bfc 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>
2013-04-04 15:55:54 -07:00
Sam Lang
14730276b9 Fixes for syntax errors found by pyflakes.
This patch includes minor fixes to the teuthology
python code for syntax errors found by running
check-syntax.sh (which runs pyflakes on each file).

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2013-01-31 07:58:57 -06:00
Joe Buck
5ce47c2a99 ssh_keys.py: pull the keys out of targets entry
rather than the hosts known hosts file.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Sam Lang <sam.lang@inktank.com>
2013-01-03 15:04:55 -08:00
Joe Buck
0cd84b3aed New ssh task that adds keys for node -> node ssh.
This generates a new keypair, pushes it to all nodes
in the context and adds all hosts to all other hosts
.ssh/authorized_keys file.
Cleans up all keys and authorized_keys entries
afterwards.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Sam Lang <sam.lang@inktank.com>
2012-12-11 14:07:28 -08:00