[Bug 3014] New: [Enhancement] Tokens for RemoteForward - for unix sockets

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Wed May 29 05:37:45 AEST 2019


https://bugzilla.mindrot.org/show_bug.cgi?id=3014

            Bug ID: 3014
           Summary: [Enhancement] Tokens for RemoteForward - for unix
                    sockets
           Product: Portable OpenSSH
           Version: 8.0p1
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: ssh
          Assignee: unassigned-bugs at mindrot.org
          Reporter: jirib79 at gmail.com

It would be great if tokens would work for RemoteForward keyword so one
could use them to define "dynamically" unix socket paths, for example
when running borg backup sw via unix sockets.

Example:

---%>---
Host *.example.com
  User backup
  Compression no
  Ciphers aes128-ctr
  MACs umac-64-etm at openssh.com
  IdentitiesOnly yes
  IdentityFile ~/.ssh/id_ed25519.%r%-example.com
  ExitOnForwardFailure yes
  StreamLocalBindUnlink yes
  RemoteForward /home/%r/tmp/borg.sock ~/tmp/%h-borg.sock # here!
  PermitLocalCommand yes
  LocalCommand socat UNIX-LISTEN:$HOME/tmp/%h-borg.sock "EXEC:borg
serve --append-only --restrict-to-path /borgbackup/example.com/%h
--umask 0007 --verbose" &
---%<---

And ssh command...

---%>---
export BACKUP_CLIENT=foo.example.com
export BACKUP_DOMAIN=$(echo ${BACKUP_CLIENT} | rev | cut -d'.' -f1-2 |
rev)
ssh -q ${BACKUP_CLIENT} "./bin/borgwrapper create --list -s
--exclude-caches
ssh://localhost/borgbackup/${BACKUP_DOMAIN}/${BACKUP_CLIENT}::'{now:%Y-%m-%dT%H:%M:%S}'
/" ; pkill -f "socat .*${BACKUP_CLIENT}"
---%<---

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list