|
|
@ -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] |
|
|
|