Skip to content

ssh: Warning highlights due to eval-like behaviour? #710

Open
@danielshahaf

Description

@danielshahaf

The arguments to ssh(1) are joined by spaces and split again on the remote end. Therefore, —

  • ssh foo printf '[%s]' bar will do globbing;
  • ssh foo mycommand $bar will word-split $bar
  • ssh foo mycommand $bar will eval any metacharacters in $bar (e.g., if bar="lorem;ipsum" then ipsum will be executed)

Is there anything here that we can highlight as a warning? (Compare #691.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions