-
Notifications
You must be signed in to change notification settings - Fork 767
Run commands for various shells
Yanbing edited this page Jan 15, 2019
·
4 revisions
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.
- MSI Install Instructions
- Script Install Instructions
- Alternative installation using the universal installer
- Retrieving download links for the latest packages