Skip to content
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 returns 1 when using with OpenSSH #23625

Closed
jakule opened this issue Mar 26, 2023 · 1 comment
Closed

scp returns 1 when using with OpenSSH #23625

jakule opened this issue Mar 26, 2023 · 1 comment
Assignees
Labels
bug OpenSSH For customers using Teleport and OpenSSH scp server-access sftp Issues related to Teleport's SFTP implementation

Comments

@jakule
Copy link
Contributor

jakule commented Mar 26, 2023

Expected behavior:

scp should return 0 when a file transfer succeeds when OpenSSH server is used.

Current behavior:

As described here #20863, file transfer returns 1 even when on success.

PR #23626 fixes the case when Teleport is used as the server.

Bug details:

  • Teleport version v10.1+
  • Recreation steps
    Run sshd server and Teleport proxy
    run scp command to copy a file
    Check the error code
  • Debug logs
@jakule jakule added bug scp OpenSSH For customers using Teleport and OpenSSH server-access sftp Issues related to Teleport's SFTP implementation labels Mar 26, 2023
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
jakule added 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
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
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
@zmb3
Copy link
Collaborator

zmb3 commented Dec 18, 2024

Fixed by #23626

@zmb3 zmb3 closed this as completed Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug OpenSSH For customers using Teleport and OpenSSH scp server-access sftp Issues related to Teleport's SFTP implementation
Projects
None yet
Development

No branches or pull requests

3 participants