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: [email protected]
          Reporter: [email protected]

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 [email protected]
  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.
_______________________________________________
openssh-bugs mailing list
[email protected]
https://lists.mindrot.org/mailman/listinfo/openssh-bugs

Reply via email to