From ef4a94e245b13aa9247bf394bc790ef365cc78e2 Mon Sep 17 00:00:00 2001 From: Yanbing Date: Sun, 13 Jan 2019 23:26:40 -0800 Subject: [PATCH] add cmd samples --- Remote-command-line-escaping-rules.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Remote-command-line-escaping-rules.md b/Remote-command-line-escaping-rules.md index b10ebc7..3790084 100644 --- a/Remote-command-line-escaping-rules.md +++ b/Remote-command-line-escaping-rules.md @@ -1,13 +1,13 @@ OpenSSH follow the below rules to determine if the " and \ in shell arguments are escaped or not -| DefaultShell | DefaultShellEscapeArguments | Path to default shell is double quoted |" and \ in arguments are escaped| -|--|--|--|--| -| powershell | value is ignored| yes | yes | -| bash | value is ignored | Yes | Yes| -| cygwin | value is ignored | Yes | Yes | -| cmd.exe | value is ignored | Yes | No | -| ssh-shellhost.exe | value is ignored | Yes | No | -| shells other than above | 1, not set | Yes | Yes | -| shells other than above | 0 | Yes | No| +| DefaultShell | example to print out "hello"
(client cmd run in cmd prompt)| Notes | +|--|--|--| +| powershell | ``c:\>ssh.exe localhost echo `\"hello`\"``
`c:\>"hello"` | PS strip the " | +| bash | to be added | | +| cygwin | to be added | | +| cmd.exe | `c:\>ssh.exe localhost echo \"hello\"`
`c:\>"hello"` | | +| ssh-shellhost.exe | to be added | | +| shells other than above | 1, not set | | +| shells other than above | 0 | | Please refer to [DefaultShell](https://github.com/PowerShell/Win32-OpenSSH/wiki/DefaultShell) for setting DefaultShell and DefaultShellEscapeArguments. \ No newline at end of file