diff --git a/linux/linux-commands.md b/linux/linux-commands.md index 22b3ec2..7e54edd 100755 --- a/linux/linux-commands.md +++ b/linux/linux-commands.md @@ -410,6 +410,7 @@ sort deserts.txt | uniq (sort without duplicates) ``` grep -irno "h1" +grep -irno "whatever" --exclude-dir=wordpress-baumfreunde-prod /home/rogrut grep -irn "h1" /home/user/verzeichnis-abc grep -irn "h1" --include \*.ps1 --include \*.txt grep -irn "h1" --include \*.ps1 --include \*.txt /home/user/verzeichnis-abc diff --git a/ssh/README.md b/ssh/README.md index 8f80937..0040d8f 100644 --- a/ssh/README.md +++ b/ssh/README.md @@ -122,6 +122,23 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS ssh -L 33333:127.0.0.1:63003 rogrut@v2202306200871231373.supersrv.de ``` +### Von Laptop auf Host C verbinden, der nur über Host B erreichbar ist + +es gilt immernoch: + +``` +ssh -L [local_port]:[destination_address]:[destination_port] [username]@[ssh_server] +``` + +nur verwenden wir nicht 127.0.0.1 sondern die IP von Host C. Zum Beispiel so: + +``` +ssh -L 8123:10.10.5.5:22 ubuntu@3.87.58.91 +``` + +Dann verbinden mit `ssh -p 8123 user1@localhost`. + + ### Port öffnen ohne Login in Shell Um zu verhindern, dass man eingeloggt wird, also nur den Port 33333 zu öffnen, müssen noch zusätzliche Parameter angegeben werden: `-LNf`, also `ssh -LNf 33333:127.0.0.1:3306 rogrut@v2202306200871231373.supersrv.de`