Hacker News new | ask | show | jobs
by wolletd 1065 days ago
From my experience, it's possible to just do

  ssh host 'ls "folder name"'
and practically ignore the `command [arguments]` split in SSHs synopsis. It's all passed to a shell and parsed again, anyway.
1 comments

For simple tasks, that's how I have always done it.

Alternatively,

   echo ls \"folder name\"|ssh -T host
or

   cat > 1
   ls "folder name"
   ^D

   ssh -T host < 1
The last example really looks like perfect case for using `here document` feature.

    ssh -T host <<EOF
    ls "folder name"
    EOF