-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scp with OpenSSH client #1048
Comments
kontsevoy
added a commit
that referenced
this issue
Jun 8, 2017
When this command is executed: ``` $ scp host:path/with/wildcards/* . ``` Teleport would launch "SSH exec" request on the sever side, which in turn would execute the following: ``` /bin/bash -c /usr/bin/teleport scp --remote-addr=127.0.0.1:44226 --local-addr=127.0.0.1:3022 -r -f path/with/wildcards/* ``` The problem is that bash will attempt to "expand" the wildcard, sending a bunch of files as an input into -f, but `teleport scp` needs to see the _exact_ string as passed via scp client. The proposed solution is to detect shell wildcard characters and wrap them in single quotes preventing them from being expanded. Another potential solution is to NOT use shell to execute SCP commands.
kontsevoy
added a commit
that referenced
this issue
Jun 9, 2017
When this command is executed: ``` $ scp host:path/with/wildcards/* . ``` Teleport would launch "SSH exec" request on the sever side, which in turn would execute the following: ``` /bin/bash -c /usr/bin/teleport scp --remote-addr=127.0.0.1:44226 --local-addr=127.0.0.1:3022 -r -f path/with/wildcards/* ``` The problem is that bash will attempt to "expand" the wildcard, sending a bunch of files as an input into -f, but `teleport scp` needs to see the _exact_ string as passed via scp client. The proposed solution is to detect shell wildcard characters and wrap them in single quotes preventing them from being expanded. Another potential solution is to NOT use shell to execute SCP commands.
hatched
pushed a commit
to hatched/teleport-merge
that referenced
this issue
Nov 30, 2022
hatched
pushed a commit
that referenced
this issue
Dec 20, 2022
hatched
pushed a commit
that referenced
this issue
Feb 1, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To reproduce:
Happens when:
This works as expected:
adding
-r
flag does not helpThe text was updated successfully, but these errors were encountered: