Commit 3ca74a8
committed
guestfs: ensure right permissions for ssh config
Ensure right permissions are set for the ~/.ssh/config_kdevops_* and
~/.ssh/config files.
From man 5 ssh_config:
FILES
~/.ssh/config
This is the per-user configuration file. The format
of this file is described above. This file is used by the SSH client.
Because of the potential for abuse, this file must have strict
permissions: read/write for the
user, and not writable by others. It may be
group-writable provided that the group in question contains only the
user.
Fixes 'make bringup' ssh error:
TASK [update_ssh_config_guestfs : Check if the new
include directive was used with a kdevops_version comment]
PLAY RECAP
localhost : ok=4 changed=0 unreachable=0
failed=0 skipped=0 rescued=0 ignored=0
dagomez | FAILED! => {
"changed": false,
"elapsed": 600,
"msg": "timed out waiting for ping module test: Failed
to connect to the host via ssh: Bad owner or permissions on
/home/dagomez/.ssh/config_kdevops_e1093bd8286b279a4838c0b4bb570d04907f43
b70e73a0badc6f3271e5790209"
}
make: *** [scripts/guestfs.Makefile:67: .provisioned_once_ssh] Error 2
stat -c '%a' \
~/.ssh/config_kdevops_e1093bd8286b279a4838c0b4bb570d04907f43b70e73a0badc
6f3271e5790209
664
stat -c '%a' ~/.ssh/
700
stat -c '%a' ~/.ssh/config
600
Reviewed-by: Luis Chamberlain <[email protected]>
Signed-off-by: Daniel Gomez <[email protected]>1 parent b346cfb commit 3ca74a8
File tree
2 files changed
+9
-0
lines changed- playbooks/roles/update_ssh_config_guestfs/tasks
- scripts
2 files changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
0 commit comments