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