EternalTerminal icon indicating copy to clipboard operation
EternalTerminal copied to clipboard

`--ssh-option=ControlPath=...` does not create any filesystem objects

Open YodaEmbedding opened this issue 2 years ago • 0 comments

$ et hostname --jumphost=hostname_in_the_middle --ssh-option="ControlMaster=auto" --ssh-option="ControlPath=$HOME/.ssh/control:%h:%p:%r"
$ ls -l ~/.ssh/control*

# Actual:
# Empty

# Expected:
srw-------  1 mulhaq users    0 2023-10-03 23:51:32 control:hostname:22:mulhaq
srw-------  1 mulhaq users    0 2023-10-03 23:51:32 control:hostname_in_the_middle:22:mulhaq

Looking at the logs, it looks like these configs are unsupported.

[INFO 2023-10-03 23:46:17,029 client-main ParseConfigFile.hpp:1400] unsupported config line:     ControlMaster auto, ignored
[INFO 2023-10-03 23:46:17,029 client-main ParseConfigFile.hpp:1400] unsupported config line:     ControlPath ~/.ssh/control:%h:%p:%r, ignored

rsync

Why is this feature useful? For rsync, usually.

  • https://unix.stackexchange.com/questions/33557/using-an-already-established-ssh-channel
  • https://unix.stackexchange.com/questions/50508/reusing-ssh-session-for-repeated-rsync-commands

https://github.com/MisterTea/EternalTerminal/issues/291#issuecomment-1100756535 seems to indicate scripts/ssh-et may cover a related use case.

Another "workaround" is to just start another ssh connection before rsync, e.g.,

rsync_hostname() {
  ssh -J hostname_in_the_middle hostname -o "ControlMaster=auto" -o "ControlPath=$HOME/.ssh/control:%h:%p:%r" -o "ControlPersist=0" -t exit
  rsync "$@"
}

YodaEmbedding avatar Oct 04 '23 06:10 YodaEmbedding