Fix logic for cmd_block.
Merge pull request #8170 from cachedout/ssh-args-hotfix

Fix logic for cmd_block.