Updated network settings.
This commit is contained in:
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user