mirror of
https://github.com/buildplan/du_setup.git
synced 2026-04-26 10:35:51 +03:00
[GH-ISSUE #54] Fails at SSH Hardening #2
Labels
No labels
bug
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/du_setup#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @chrostino on GitHub (Oct 6, 2025).
Original GitHub issue: https://github.com/buildplan/du_setup/issues/54
Originally assigned to: @buildplan on GitHub.
On a fresh install of Debian 13, running the script as root
@buildplan commented on GitHub (Oct 13, 2025):
I am having a hard time reproducing this error. Your error indicates that the key was not saved because of permission issues. If the script was executed as the root user, then there should not have been any permission issues....
If you still have issues help me reproduce this and if this was on a VPS which provider you were using.
@chrostino commented on GitHub (Oct 13, 2025):
I am sure I've ran the script multiple times, both as root and as a sudo user with
sudo -E. I even reinstalled debian thinking it was an issue with my installation, maybe later I'll try installing debian 13 in a vm on my main machine and try again.Also I tried to run the script in an ubuntu server installation and it worked with no issue
@buildplan commented on GitHub (Oct 13, 2025):
I will try to test this tonight a few times with different options to see where it is failing. If you find any more clues please share. Thanks for checking.
@buildplan commented on GitHub (Oct 13, 2025):
I think I know whats happening - I looked at the logic and see that when I copy the genrated key to admin user in the script, script copies this as admin user and not root. So I need to add a step for .ssh dir. for admin user to be owned by admin if that makes any sense - I will fix this thanks for reporting .
@chrostino commented on GitHub (Oct 13, 2025):
Weird that it works on ubuntu server and not in debian tho (if I understood the issue)
@buildplan commented on GitHub (Oct 13, 2025):
That's a good observation, and this helped me figure it out. So in Ubuntu when a new user is created I think it automatically created
.sshdirectory for that user but in Debian directory is only created after use generates a ssh key or creates it manually@buildplan commented on GitHub (Oct 13, 2025):
If you have time you could check the revised version and see if it behaves on Debian - I will push this to main branch after checking tonight
wget https://github.com/buildplan/du_setup/raw/refs/heads/ownership_fix/du_setup.sh@chrostino commented on GitHub (Oct 13, 2025):
seems to have worked out fine in a vm
@buildplan commented on GitHub (Oct 13, 2025):
Thanks for checking.