fix path
This commit is contained in:
parent
db3ad3d918
commit
6e8f8e830e
@ -12,6 +12,7 @@ packages:
|
||||
package_update: true
|
||||
package_upgrade: true
|
||||
runcmd:
|
||||
- "wget https://git.wmi.amu.edu.pl/s470607/code-server-test/src/branch/master/setup.sh"
|
||||
- "wget https://git.wmi.amu.edu.pl/s470607/code-server-test/raw/branch/master/setup.sh"
|
||||
- "chmod +x setup.sh"
|
||||
- "sh setup.sh"
|
||||
- "bash setup.sh"
|
||||
- "reboot"
|
||||
|
9
setup.sh
9
setup.sh
@ -1,4 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
curl -fOL https://github.com/cdr/code-server/releases/download/v3.12.0/code-server_3.12.0_amd64.deb
|
||||
dpkg -i code-server_3.12.0_amd64.deb
|
||||
systemctl enable --now code-server@kk
|
||||
|
||||
|
||||
printf "[sshd]\nenabled = true\nbanaction = iptables-multiport" > /etc/fail2ban/jail.local
|
||||
systemctl enable fail2ban
|
||||
ufw allow OpenSSH
|
||||
@ -10,6 +16,5 @@ sed -i -e '/^#MaxAuthTries/s/^.*$/MaxAuthTries 2/' /etc/ssh/sshd_config
|
||||
sed -i -e '/^#AllowTcpForwarding/s/^.*$/AllowTcpForwarding no/' /etc/ssh/sshd_config
|
||||
sed -i -e '/^#AllowAgentForwarding/s/^.*$/AllowAgentForwarding no/' /etc/ssh/sshd_config
|
||||
sed -i -e '/^#AuthorizedKeysFile/s/^.*$/AuthorizedKeysFile .ssh\/authorized_keys/' /etc/ssh/sshd_config
|
||||
sed -i '$a AllowUsers holu' /etc/ssh/sshd_config
|
||||
reboot
|
||||
sed -i '$a AllowUsers kk' /etc/ssh/sshd_config
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user