Run commands for various shells - billdinger/Win32-OpenSSH GitHub Wiki

Examples to run commands on remote shells over openssh: print out "hello" over various shells on server.

DefaultShell cmd run on local shell Cmd to run on remote shell (client cmd run in cmd prompt)
powershell echo '"hello"'
or echo `"hello`"
c:\>ssh.exe localhost echo '\"hello\"'
or c:\>ssh.exe winbox echo `\"hello`\"
or c:\>ssh.exe localhost "echo `""hello`"""
bash echo \"hello\"
or echo '"hello"'
c:\>ssh winbox 'echo \"hello\"'
or c:\>ssh.exe winbox echo \\\"hello\\\"
or c:\>ssh winbox echo '\"hello\"'
cygwin echo \"hello\"
or echo '"hello"'
c:\>ssh winbox 'echo \"hello\"'
or c:\>ssh.exe winbox echo \\\"hello\\\"
or c:\>ssh winbox echo '\"hello\"'
cmd.exe echo "hello" c:\>ssh.exe winbox echo \"hello\"
or c:\>ssh.exe winbox "echo ""hello"""
ssh-shellhost.exe to be added to be added

If you have a shell other than above and want it to receive exactly the same argument list that the ssh received on the server side, Please refer to DefaultShell for setting DefaultShell and set DefaultShellEscapeArguments to 0.

⚠️ **GitHub.com Fallback** ⚠️