sshfs and scp enhancements#1904
Open
Rubusch wants to merge 4 commits into
Open
Conversation
Add file globbing, e.g. writing `*.txt` to copy multiple files at once. Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
Add functionality to moung and unmount remote directorys via sshfs on a local mount point. The labgrid prompt returns, the sshfs share stays mounted until unmounted. Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
Add the possibility to mount a local folder on a remote host. Open a ssh connection to the configured SSH target, to issue a remote sshfs mount command. A running sshd (locally) and sshfs is required to be installed for this functionality. Then use the ':' to indicate the remote side. Available commands are then: ---------------------------- $ labgrid-client remote_dir local_mnt or $ labgrid-client :remote_dir local_mnt mounts in the foreground and does not come back until signalled $ labgrid-client --mount remote_dir local_dir or $ labgrid-client --mount :remote_dir local_dir mounts in the background, prompt returns, share stays mounted $ labgrid-client --unmount local_dir or $ labgrid-client --unmount remote_dir local_dir or $ labgrid-client --unmount :remote_dir local_dir unmounts local sshfs share, when mounted with '--mount' before $ labgrid-client --mount local_dir :remote_mnt mounts a local dir on a remote mountpoint $ labgrid-client --unmount :remote_mnt or $ labgrid-client --unmount local_dir :remote_mnt unmount a remote mountpoint if mounted before using :remote_mnt Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
Add a warning, when permissions of mount point prevent a mounting. Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
Member
|
The examples in the description seem to be missing the @JPEWdev Didn't you do something similar for reverse sshfs, without starting a new SSH connection? |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi! This series would introduce the below described. I'm using this implementation in my labgrid forks, and would like to contribute, if this could be of general interest, too, and fits into your plan. So, please let me know, if it could be of any interest for the upstream labgrid project as well?
Q: Given this makes sense to you guys, I'll probably need to extend the
tests/test_sshdriver.py, in case tests then might need to introduce a certain mock implementation. Is this approach ok, or which test approach/test coverage would you expect here?Q: I'm also unsure, what is actually needed: I think in case the doc/configuration.rst might see a little update, but unsure? Also about doc/usage.rst and doc/development.rst - please let me know roughly, what documentation I'd need to add to this series. Anyway I could give it a try and see what fits.
Note, I'll let updating the Documentation and Manpage generation according to README / description, pending on your feedback on this series. Thanks for reading.
Extend SSH Support
--mountand--unmountargumentsThe series will allow the following set of commands (and API accordingly)
or
mounts in the foreground and does not come back until signalled
or
mounts in the background, prompt returns, share stays mounted
or
or
unmounts local sshfs share, when mounted with '--mount' before
mounts a local dir on a remote mountpoint
or
unmount a remote mountpoint if mounted before using :remote_mnt
Checklist
edit: I fixed missing "sshfs" in examples, as remarked by jluebbe