-
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 returning non-zero exit code on successful transfer #20863
Comments
Closed
@jdconti Thanks for reporting that. I was able to reproduce the issue. Looks like it's related to this: pkg/sftp#321 |
jakule
added a commit
that referenced
this issue
Mar 26, 2023
Go SFTP doesn't return error code as mentioned here pkg/sftp#321. As a consequence of that `scp` returns error code 1 if no code wa returned for the server, which makes it look like something went wrong even on successful transfer. This PR adds the return code to the SFTP subsystem, which fixes the described behavior. Closes #20863 Note: The error code is not returned when using OpenSSH server and client. This PR only fixes the behavior when Teleport is used as a server. Here is an issue tro trace it #23625
github-actions bot
pushed a commit
that referenced
this issue
Mar 28, 2023
Go SFTP doesn't return error code as mentioned here pkg/sftp#321. As a consequence of that `scp` returns error code 1 if no code wa returned for the server, which makes it look like something went wrong even on successful transfer. This PR adds the return code to the SFTP subsystem, which fixes the described behavior. Closes #20863 Note: The error code is not returned when using OpenSSH server and client. This PR only fixes the behavior when Teleport is used as a server. Here is an issue tro trace it #23625
github-actions bot
pushed a commit
that referenced
this issue
Mar 28, 2023
Go SFTP doesn't return error code as mentioned here pkg/sftp#321. As a consequence of that `scp` returns error code 1 if no code wa returned for the server, which makes it look like something went wrong even on successful transfer. This PR adds the return code to the SFTP subsystem, which fixes the described behavior. Closes #20863 Note: The error code is not returned when using OpenSSH server and client. This PR only fixes the behavior when Teleport is used as a server. Here is an issue tro trace it #23625
github-actions bot
pushed a commit
that referenced
this issue
Mar 28, 2023
Go SFTP doesn't return error code as mentioned here pkg/sftp#321. As a consequence of that `scp` returns error code 1 if no code wa returned for the server, which makes it look like something went wrong even on successful transfer. This PR adds the return code to the SFTP subsystem, which fixes the described behavior. Closes #20863 Note: The error code is not returned when using OpenSSH server and client. This PR only fixes the behavior when Teleport is used as a server. Here is an issue tro trace it #23625
This was referenced Mar 28, 2023
jakule
added a commit
that referenced
this issue
Mar 31, 2023
Go SFTP doesn't return error code as mentioned here pkg/sftp#321. As a consequence of that `scp` returns error code 1 if no code wa returned for the server, which makes it look like something went wrong even on successful transfer. This PR adds the return code to the SFTP subsystem, which fixes the described behavior. Closes #20863 Note: The error code is not returned when using OpenSSH server and client. This PR only fixes the behavior when Teleport is used as a server. Here is an issue tro trace it #23625
jakule
added a commit
that referenced
this issue
Mar 31, 2023
Go SFTP doesn't return error code as mentioned here pkg/sftp#321. As a consequence of that `scp` returns error code 1 if no code wa returned for the server, which makes it look like something went wrong even on successful transfer. This PR adds the return code to the SFTP subsystem, which fixes the described behavior. Closes #20863 Note: The error code is not returned when using OpenSSH server and client. This PR only fixes the behavior when Teleport is used as a server. Here is an issue tro trace it #23625
jakule
added a commit
that referenced
this issue
Mar 31, 2023
Go SFTP doesn't return error code as mentioned here pkg/sftp#321. As a consequence of that `scp` returns error code 1 if no code wa returned for the server, which makes it look like something went wrong even on successful transfer. This PR adds the return code to the SFTP subsystem, which fixes the described behavior. Closes #20863 Note: The error code is not returned when using OpenSSH server and client. This PR only fixes the behavior when Teleport is used as a server. Here is an issue tro trace it #23625
I get this issue with agentless nodes on v17. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior:
Transfer a file using scp -> teleport daemon (via proxy) using OpenSSH 9.0p1 and observe an exit code of zero on successful transfer.
Current behavior:
Transfer a file using scp -> teleport daemon (via proxy) using OpenSSH 9.0p1 and observe a non-zero exit code on successful transfer.
Bug details:
11.2.1
9.0p1
touch testfile; scp testfile user@host:/tmp; echo $?
and observe non-zero exit codeThe text was updated successfully, but these errors were encountered: