-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
28626cb
commit 690f4bd
Showing
3 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
##### | ||
# Set's root password and starts sshd | ||
#### | ||
# @since: 2023-12-16 | ||
# @author: stev leibelt <artodeto@bazzline.net> | ||
#### | ||
|
||
function _main () | ||
{ | ||
echo ":: Setting root password" | ||
passwd | ||
echo ":: Adapting sshd and starting it" | ||
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config | ||
systemctl enable --now sshd | ||
|
||
echo ":: Use root@<ip_listed_below> from a remote machine to log in" | ||
ip a | grep inet | ||
} | ||
|
||
_main "${@}" |