Compare commits
No commits in common. "6177ff29de35e219f864af04913ba83b6fd17032" and "38830880d619fd27aedccbe676830ec0854806a7" have entirely different histories.
6177ff29de
...
38830880d6
@ -12,10 +12,9 @@ ClientAliveCountMax 30
|
|||||||
Protocol 2
|
Protocol 2
|
||||||
|
|
||||||
### Authentication settings
|
### Authentication settings
|
||||||
HostKey /etc/ssh/ed25519.key.pub
|
HostKey /etc/ssh/ed25519.key
|
||||||
HostKey /etc/ssh/RSA4096.key.pub
|
HostKey /etc/ssh/RSA4096.key
|
||||||
#PasswordAuthentication no
|
PasswordAuthentication no
|
||||||
PasswordAuthentication yes
|
|
||||||
PermitEmptyPasswords no
|
PermitEmptyPasswords no
|
||||||
ChallengeResponseAuthentication no
|
ChallengeResponseAuthentication no
|
||||||
UsePAM yes
|
UsePAM yes
|
||||||
@ -25,8 +24,8 @@ AuthorizedKeysFile .ssh/authorized_keys
|
|||||||
LoginGraceTime 1M
|
LoginGraceTime 1M
|
||||||
MaxAuthTries 3
|
MaxAuthTries 3
|
||||||
MaxSessions 5
|
MaxSessions 5
|
||||||
#PermitRootLogin no
|
#PermitRootLogin prohibit-password
|
||||||
PermitRootLogin yes
|
PermitRootLogin no
|
||||||
|
|
||||||
### Program settings
|
### Program settings
|
||||||
Banner /etc/ssh/banner
|
Banner /etc/ssh/banner
|
||||||
|
72
customize.sh
72
customize.sh
@ -1,72 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
#######
|
|
||||||
### Copy customization files to their proper locations after backing up
|
|
||||||
### original files
|
|
||||||
#######
|
|
||||||
|
|
||||||
### Verify this script is running as root, otherwise exit with notification
|
|
||||||
if [ $(id -u) -ne 0 ]; then
|
|
||||||
echo -e "\n\e[1;31mThis script MUST be run as ROOT. Exiting\e[0m"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
### Let user know what's happening
|
|
||||||
echo -e "\nThis script will copy TEMPLATE files to various locations in order \
|
|
||||||
to customize your system. Backups will be created in-place with the \
|
|
||||||
extension '.original'"
|
|
||||||
echo -e "\n\e[0;33mPlease note: It's still up to you to customize the template \
|
|
||||||
files with settings appropriate to your environment!"
|
|
||||||
echo -e"\n\e[0;36mDetails about template files are in the readme.md files \
|
|
||||||
within each directory in this archive.\e[0m\n"
|
|
||||||
|
|
||||||
### Copy files to proper locations
|
|
||||||
|
|
||||||
## Copy root's .bashrc
|
|
||||||
echo -e "\ncopying .bashrc to /root..."
|
|
||||||
# backup
|
|
||||||
cp -f /root/.bashrc /root/.bashrc.original
|
|
||||||
# copy new
|
|
||||||
cp -f root/.bashrc /root/.bashrc
|
|
||||||
echo "...done"
|
|
||||||
|
|
||||||
## Copy profile template files and skel files
|
|
||||||
echo -e "\ncopying default bash profile files..."
|
|
||||||
# backup
|
|
||||||
cp -f /etc/profile /etc/profile.original
|
|
||||||
cp -f /etc/bash.bashrc /etc/bash.bashrc.original
|
|
||||||
cp -f /etc/skel/.bashrc /etc/skel/.bashrc.original
|
|
||||||
# copy new
|
|
||||||
cp -f etc/profile /etc/profile
|
|
||||||
cp -f etc/bash.bashrc /etc/bash.bashrc
|
|
||||||
cp -f etc/skel/.bashrc /etc/skel/.bashrc
|
|
||||||
echo "...done"
|
|
||||||
|
|
||||||
## copy nano settings
|
|
||||||
echo -e "\ncopying nano default settings..."
|
|
||||||
# backup
|
|
||||||
cp -f /etc/nanorc /etc/nanorc.original
|
|
||||||
# copy new
|
|
||||||
cp -f etc/nanorc /etc/nanorc
|
|
||||||
echo "...done"
|
|
||||||
|
|
||||||
## copy timesync
|
|
||||||
echo -e "\ncopying timesync configuration..."
|
|
||||||
# backup
|
|
||||||
cp -f /etc/systemd/timesyncd.conf /etc/systemd/timesyncd.conf.original
|
|
||||||
# copy new
|
|
||||||
cp -f etc/systemd/timesyncd.conf /etc/systemd/timesyncd.conf
|
|
||||||
echo "...done"
|
|
||||||
|
|
||||||
## copy sshd configuration
|
|
||||||
echo -e "\ncopying sshd configuration..."
|
|
||||||
# backup
|
|
||||||
cp -f /etc/ssh/sshd_config /etc/ssh/sshd_config.original
|
|
||||||
# copy new
|
|
||||||
cp -f etc/ssh/sshd_config /etc/ssh/sshd_config
|
|
||||||
echo "...done"
|
|
||||||
|
|
||||||
### Exit gracefully
|
|
||||||
echo -e "\n\e[0;32mAll done!\n"
|
|
||||||
|
|
||||||
exit 0
|
|
Loading…
Reference in New Issue
Block a user