Skip to content

Commit 854238d

Browse files
committed
guestfs: ensure right permissions for ssh config
Ensure right permissions for the ~/.ssh/config_kdevops_* file. 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': 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 Signed-off-by: Daniel Gomez <[email protected]>
1 parent f686c7d commit 854238d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/update_ssh_config_guestfs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def main():
9292
}
9393
sshconf.write(ssh_template.format(**context))
9494
sshconf.close()
95+
os.chmod(ssh_config, 0o600)
9596

9697
if __name__ == "__main__":
9798
main()

0 commit comments

Comments
 (0)