skiffos / SkiffOS

Any Linux distribution, anywhere.
https://skiffos.com
MIT License
687 stars 51 forks source link

skiff-core: forward ssh channels into container #245

Open paralin opened 1 year ago

paralin commented 1 year ago

Currently sshfs and sftp and scp will not work correctly:

scp ./linux.iso core@pi4-1:~/
# scp: Connection closed

Rsync works correctly, because it starts a separate TCP server:

rsync -rav --progress ./linux.iso core@pi4-1:~/

The SSH channels - for example sftp - are not forwarded into the container. Currently skiff-core just knows how to forward the stdin/stdout streams into the container via docker exec: https://github.com/skiffos/skiff-core/blob/master/shell/shell.go#L96

This issue tracks adding support for ssh channels to skiff-core.

Workaround: use rsync instead, or run a sshd instance inside the container on a different port.