Updated remote script
On Thu, 19 Jan 2012 15:31:02 -0500, Jesse Rosenthal wrote: > Hi Tomi, > > On Thu, 19 Jan 2012 19:50:38 +0200, Tomi Ollila wrote: > > Quick comments: "/tmp/notmuch_dtach.socket" is dangerous (and the _ssh). > > > > either > > make directory /tmp/notmuch_`id -u` > > and chmod it to 0700 > > and make sure you own it and it has right permissions. > > or > > make directory for these sockets in $HOME and chmod that to 700 > > or > > just drop the socket in $HOME/.ssh (which should already be > > protected) > > Thanks very much for that. I made some quick changes, based on your > first suggestion above. I'm pretty sure the checks are not in the most > optimal order, but it seemed worth getting the changes up. Indeed! > As always, of course, anyone is more than welcome to change and improve > the version up there. I was mainly changing it just to get my last > error-ridden version out of circulation. I'll probably play with that in (far ;) future... > > Thanks again, > Jesse Thanks, good script! Tomi
Re: Updated remote script
On Thu, 19 Jan 2012 15:31:02 -0500, Jesse Rosenthal wrote: > Hi Tomi, > > On Thu, 19 Jan 2012 19:50:38 +0200, Tomi Ollila wrote: > > Quick comments: "/tmp/notmuch_dtach.socket" is dangerous (and the _ssh). > > > > either > > make directory /tmp/notmuch_`id -u` > > and chmod it to 0700 > > and make sure you own it and it has right permissions. > > or > > make directory for these sockets in $HOME and chmod that to 700 > > or > > just drop the socket in $HOME/.ssh (which should already be > > protected) > > Thanks very much for that. I made some quick changes, based on your > first suggestion above. I'm pretty sure the checks are not in the most > optimal order, but it seemed worth getting the changes up. Indeed! > As always, of course, anyone is more than welcome to change and improve > the version up there. I was mainly changing it just to get my last > error-ridden version out of circulation. I'll probably play with that in (far ;) future... > > Thanks again, > Jesse Thanks, good script! Tomi ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Updated remote script
On Thu, 19 Jan 2012 11:24:32 -0500, Jesse Rosenthal wrote: > Dear all, > > The big change in this script is that it uses dtach to set up a ssh > socket, rather than suggesting that users do so themselves with the > ControlMaster configuration option. This has the benefit of not making > anyone mess with ~/.ssh, and not impacting your other ssh work. It also > handles the issues of dead sockets on a laptop. (`ssh -Nf` seems like it > *should* work too, but emacs hangs when it is used in a script.) The > problem with this approach, of course, is that it requires dtach. A good > solution would be to (a) make the use of reusable ssh sockets optional, > and (b) allow it to use screen or tmux instead of dtach. Both would be > pretty easy, and I'll work on it at some point. But I figured getting a > two-year-old, broken script of the wiki would be a good first step. Quick comments: "/tmp/notmuch_dtach.socket" is dangerous (and the _ssh). either make directory /tmp/notmuch_`id -u` and chmod it to 0700 and make sure you own it and it has right permissions. or make directory for these sockets in $HOME and chmod that to 700 or just drop the socket in $HOME/.ssh (which should already be protected) I personally use dtach, but basically never tmux nor screen ;) --8<8<8<8<8<8<8<8<-- In one of my scripts I do controlmaster connection in the following way: ssh -O check "$rhost" || ssh -f -oControlMaster=yes $rhost sleep 18001 ... echo Backgroung ssh tunnel open for 5 hours. echo SIGTERM pid `ps ax | awk '/180[0]1/ { print $1; }'` \ In case that is not what you want. and then ssh -oControlMaster=no $rhost command args to do the jobs... > [0] http://notmuchmail.org/remoteusage/ more later.. > Best, > Jesse Tomi
Updated remote script
Hi Tomi, On Thu, 19 Jan 2012 19:50:38 +0200, Tomi Ollila wrote: > Quick comments: "/tmp/notmuch_dtach.socket" is dangerous (and the _ssh). > > either > make directory /tmp/notmuch_`id -u` > and chmod it to 0700 > and make sure you own it and it has right permissions. > or > make directory for these sockets in $HOME and chmod that to 700 > or > just drop the socket in $HOME/.ssh (which should already be > protected) Thanks very much for that. I made some quick changes, based on your first suggestion above. I'm pretty sure the checks are not in the most optimal order, but it seemed worth getting the changes up. As always, of course, anyone is more than welcome to change and improve the version up there. I was mainly changing it just to get my last error-ridden version out of circulation. Thanks again, Jesse
Re: Updated remote script
Hi Tomi, On Thu, 19 Jan 2012 19:50:38 +0200, Tomi Ollila wrote: > Quick comments: "/tmp/notmuch_dtach.socket" is dangerous (and the _ssh). > > either > make directory /tmp/notmuch_`id -u` > and chmod it to 0700 > and make sure you own it and it has right permissions. > or > make directory for these sockets in $HOME and chmod that to 700 > or > just drop the socket in $HOME/.ssh (which should already be > protected) Thanks very much for that. I made some quick changes, based on your first suggestion above. I'm pretty sure the checks are not in the most optimal order, but it seemed worth getting the changes up. As always, of course, anyone is more than welcome to change and improve the version up there. I was mainly changing it just to get my last error-ridden version out of circulation. Thanks again, Jesse ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Updated remote script
Dear all, Just wanted to note that I finally got around to updating the way-deprecated "remoteusage" wiki page[0], with a simplified script, that takes into account comments that some have made in the past. Caching for attachments is gone, since the complications of part handling vs. raw handling seems to have made it more trouble than it was worth at the moment. (And because I do most of my work on a well-connected machine.) The big change in this script is that it uses dtach to set up a ssh socket, rather than suggesting that users do so themselves with the ControlMaster configuration option. This has the benefit of not making anyone mess with ~/.ssh, and not impacting your other ssh work. It also handles the issues of dead sockets on a laptop. (`ssh -Nf` seems like it *should* work too, but emacs hangs when it is used in a script.) The problem with this approach, of course, is that it requires dtach. A good solution would be to (a) make the use of reusable ssh sockets optional, and (b) allow it to use screen or tmux instead of dtach. Both would be pretty easy, and I'll work on it at some point. But I figured getting a two-year-old, broken script of the wiki would be a good first step. [0] http://notmuchmail.org/remoteusage/ Best, Jesse
Re: Updated remote script
On Thu, 19 Jan 2012 11:24:32 -0500, Jesse Rosenthal wrote: > Dear all, > > The big change in this script is that it uses dtach to set up a ssh > socket, rather than suggesting that users do so themselves with the > ControlMaster configuration option. This has the benefit of not making > anyone mess with ~/.ssh, and not impacting your other ssh work. It also > handles the issues of dead sockets on a laptop. (`ssh -Nf` seems like it > *should* work too, but emacs hangs when it is used in a script.) The > problem with this approach, of course, is that it requires dtach. A good > solution would be to (a) make the use of reusable ssh sockets optional, > and (b) allow it to use screen or tmux instead of dtach. Both would be > pretty easy, and I'll work on it at some point. But I figured getting a > two-year-old, broken script of the wiki would be a good first step. Quick comments: "/tmp/notmuch_dtach.socket" is dangerous (and the _ssh). either make directory /tmp/notmuch_`id -u` and chmod it to 0700 and make sure you own it and it has right permissions. or make directory for these sockets in $HOME and chmod that to 700 or just drop the socket in $HOME/.ssh (which should already be protected) I personally use dtach, but basically never tmux nor screen ;) --8<8<8<8<8<8<8<8<-- In one of my scripts I do controlmaster connection in the following way: ssh -O check "$rhost" || ssh -f -oControlMaster=yes $rhost sleep 18001 ... echo Backgroung ssh tunnel open for 5 hours. echo SIGTERM pid `ps ax | awk '/180[0]1/ { print $1; }'` \ In case that is not what you want. and then ssh -oControlMaster=no $rhost command args to do the jobs... > [0] http://notmuchmail.org/remoteusage/ more later.. > Best, > Jesse Tomi ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Updated remote script
Dear all, Just wanted to note that I finally got around to updating the way-deprecated "remoteusage" wiki page[0], with a simplified script, that takes into account comments that some have made in the past. Caching for attachments is gone, since the complications of part handling vs. raw handling seems to have made it more trouble than it was worth at the moment. (And because I do most of my work on a well-connected machine.) The big change in this script is that it uses dtach to set up a ssh socket, rather than suggesting that users do so themselves with the ControlMaster configuration option. This has the benefit of not making anyone mess with ~/.ssh, and not impacting your other ssh work. It also handles the issues of dead sockets on a laptop. (`ssh -Nf` seems like it *should* work too, but emacs hangs when it is used in a script.) The problem with this approach, of course, is that it requires dtach. A good solution would be to (a) make the use of reusable ssh sockets optional, and (b) allow it to use screen or tmux instead of dtach. Both would be pretty easy, and I'll work on it at some point. But I figured getting a two-year-old, broken script of the wiki would be a good first step. [0] http://notmuchmail.org/remoteusage/ Best, Jesse ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch