X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=remoteusage%2Fremotewrapper.mdwn;h=92fb1fa4c1ed4020b7b238f4b3ec8516410b4837;hb=6fce39699bece93fe43a047d43f646f4165734ed;hp=ba1daac865ea0d7e27b1a82db64eb4fd0435a490;hpb=b631323a823b7393cabf9f4c7241fc67fee99dea;p=notmuch-wiki diff --git a/remoteusage/remotewrapper.mdwn b/remoteusage/remotewrapper.mdwn index ba1daac..92fb1fa 100644 --- a/remoteusage/remotewrapper.mdwn +++ b/remoteusage/remotewrapper.mdwn @@ -2,7 +2,7 @@ # Run notmuch on remote host over SSH # - # http://notmuchmail.org/remoteusage/ + # https://notmuchmail.org/remoteusage/ # # Put this script in your path and add (setq notmuch-command # "notmuch-remote") to your emacs configuration. @@ -15,7 +15,9 @@ # User username SSH_REMOTE_HOST=notmuch - SSH_CONTROL_PATH="-o ControlPath=/tmp/notmuch-remote.${USER}.%r@%h:%p" + + # Note: for security reasons the control socket is placed in ~/.ssh + SSH_CONTROL_PATH='-o ControlPath=~/.ssh/notmuch-remote.%r@%h:%p' # Start a background master connection if one isn't running yet ssh ${SSH_CONTROL_PATH} -O check ${SSH_REMOTE_HOST} 2>/dev/null || @@ -26,4 +28,4 @@ # This requires the bash version of printf (bashism) printf -v ARGS "%q " "$@" - ssh ${SSH_CONTROL_PATH} ${SSH_REMOTE_HOST} notmuch ${ARGS} + exec ssh ${SSH_CONTROL_PATH} ${SSH_REMOTE_HOST} notmuch ${ARGS}