From e49b992a236185e1373ad1ac120320b6fddfb002 Mon Sep 17 00:00:00 2001 From: zeus Date: Tue, 19 Oct 2021 20:06:26 +0300 Subject: [PATCH] add scan --- intro/modules/ROOT/pages/exer.adoc | 19 +++++++++++++++++++ intro/modules/ROOT/pages/index.adoc | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/intro/modules/ROOT/pages/exer.adoc b/intro/modules/ROOT/pages/exer.adoc index fd488fa..7adc47f 100644 --- a/intro/modules/ROOT/pages/exer.adoc +++ b/intro/modules/ROOT/pages/exer.adoc @@ -46,6 +46,25 @@ NOTE: try to find the differences between them! ssh docker@[IP] ---- + +== SSH run command + +Run command using the following syntax: + +[source,bash] +---- +## user syntax ## +ssh -t docker@192.168.128.3 'ip a' + +## sudo syntax ## +ssh -t docker@192.168.128.3 'echo docker | sudo -S cat /etc/passwd' +# ^^^^^ USER ^^^ IP ^^^^^^^ sudo password ^^^^^^^^ COMMAND + +## su syntax ## +ssh docker@nas01 su -c "/path/to/command1 arg1 arg2" +---- + + == SSH password [source,bash] diff --git a/intro/modules/ROOT/pages/index.adoc b/intro/modules/ROOT/pages/index.adoc index b3d5880..421e10d 100644 --- a/intro/modules/ROOT/pages/index.adoc +++ b/intro/modules/ROOT/pages/index.adoc @@ -9,7 +9,7 @@ This tutorial demonstrates some common nmap port scanning scenarios and explains [source,bash] ---- -# ifconfig +# ifconfig ή ip a eth0: flags=4163 mtu 1500 inet 172.21.0.2 netmask 255.255.0.0 broadcast 172.21.255.255