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

Bug crappy scp Fixes #13 #14

Merged
merged 12 commits into from
Aug 21, 2019
Merged

Bug crappy scp Fixes #13 #14

merged 12 commits into from
Aug 21, 2019

Conversation

willnx
Copy link
Owner

@willnx willnx commented Aug 21, 2019

Wow, this was a lot of work, but totally worth it!!!!

With this update, users can SCP/SFTP files from their local machine into the container on the other side of an SSH connection.

This new functionality totally deprecates the (crappy) functionality of SSH implemented via PR #7

To add this functionality, ContainerShell had to absorb the source of dockerpty so it could handle a non-TTY environment. Basically, dockerpty would always assume it operated with a TTY from the host, which works for standard SSHing. However, when using SCP/SFTP, you get no TTY, and in fact, a TTY breaks those protocols. When those protocols are all done sending data, they send a zero-byte packet to trigger an End Of File (EOF) on the remote end. Because of how dockerpty handled blocked when hijacking the local TTY, it wouldn't stop looping if stdin received an EOF.

Specifics about what I changed can be found via a PR I created with dockerpty:
d11wtq/dockerpty#82

@willnx willnx merged commit 444fef2 into master Aug 21, 2019
@willnx willnx deleted the bug_crappy_scp branch August 21, 2019 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant