Updated network settings.

This commit is contained in:
2021-06-26 20:32:37 +12:00
parent 0336c983bc
commit ad69d39fbe
2 changed files with 3 additions and 4 deletions

View File

@ -1,8 +1,7 @@
version: 2
ethernets:
eth0:
dhcp4: no
addresses:
- 192.168.1.122
- 192.168.1.142
gateway4: 192.168.1.1
nameservers: 1.1.1.3

View File

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