Added bash prompt configuration.

This commit is contained in:
2021-06-26 17:37:23 +12:00
parent fb0c7323e4
commit 0336c983bc

View File

@ -48,11 +48,12 @@ locale: en_NZ
# ================================================================== # ==================================================================
# Harden ssh # Harden ssh and set bash prompt
# ================================================================== # ==================================================================
runcmd: runcmd:
- sed -i -e '/^Port/s/^.*$/Port 2122/' /etc/ssh/sshd_config - sed -i -e '/^Port/s/^.*$/Port 2122/' /etc/ssh/sshd_config
- sed -i -e '/^PermitRootLogin/s/^.*$/PermitRootLogin no/' /etc/ssh/sshd_config - sed -i -e '/^PermitRootLogin/s/^.*$/PermitRootLogin no/' /etc/ssh/sshd_config
- sed -i -e '$aAllowUsers james' /etc/ssh/sshd_config - sed -i -e '$aAllowUsers james' /etc/ssh/sshd_config
- restart ssh - restart ssh
- echo "PS1='\[\033[02;31m\]\u@\H:\[\033[01;34m\]\w\$\[\033[00m\] '" >> /home/james/.bashrc
# ================================================================== # ==================================================================