Skip to content
Snippets Groups Projects
Verified Commit 39565abe authored by Tóth Miklós Tibor's avatar Tóth Miklós Tibor :shrug:
Browse files

eloadas beta 1

parent 6ed35c21
No related branches found
No related tags found
No related merge requests found
......@@ -65,3 +65,95 @@ curl https://git.sch.bme.hu/mikewashere.keys >> .ssh/authorized_keys
- shell automatizálása
- mintha soronként kiadnánk a parancsokat
```shell-session
[mike@thinkyboi tmp]$ vi test.sh
[mike@thinkyboi tmp]$ cat test.sh
echo "ez simán működik" | cowsay
curl "https://home.sch.bme.hu/~mikewashere/linux/eloadas.md" | grep "soronként" | cowsay
[mike@thinkyboi tmp]$ bash test.sh
_____________________
< ez simán működik >
---------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1596 100 1596 0 0 69391 0 --:--:-- --:--:-- --:--:-- 69391
_________________________________
/ - mintha soronként kiadnánk a \
\ parancsokat /
---------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
[mike@thinkyboi tmp]$
```
# shebang
- file futtatásakor a kernel meglesi mi van az elején
- el tudunk indítani scripteket programként
- `#!<program>`
```shell-session
[mike@thinkyboi tmp]$ vi test.sh
[mike@thinkyboi tmp]$ cat test.sh
#!/bin/bash
echo "ez simán működik" | cowsay
curl "https://home.sch.bme.hu/~mikewashere/linux/eloadas.md" | grep "soronként" | cowsay
[mike@thinkyboi tmp]$ chmod +x test.sh
[mike@thinkyboi tmp]$ ./test.sh
_____________________
< ez simán működik >
---------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1596 100 1596 0 0 11319 0 --:--:-- --:--:-- --:--:-- 11319
_________________________________
/ - mintha soronként kiadnánk a \
\ parancsokat /
---------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
[mike@thinkyboi tmp]$
```
# tűzfal
- a kernel belsejében -> gyors, de low-level
- iptables
- kényelmesebb egy tűzfal-kezelő
## UFW
- uncomplicated firewall
- egyszerű
```shell-session
[mike@thinkyboi tmp]$ sudo ufw allow 80
Rules updated
Rules updated (v6)
[mike@thinkyboi tmp]$ sudo ufw allow https
Rules updated
Rules updated (v6)
[mike@thinkyboi tmp]$ sudo ufw enable
```
# SSH kulcsok
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment