zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: Backgrounding part of 'ssh-agent $cmd'
Date: Wed, 16 Jan 2013 09:35:14 -0800	[thread overview]
Message-ID: <130116093514.ZM19656@torch.brasslantern.com> (raw)
In-Reply-To: <20130116065951.GA2992@lp-shahaf.local>

On Jan 16,  8:59am, Daniel Shahaf wrote:
} Subject: Backgrounding part of 'ssh-agent $cmd'
}
} More specifically, my workflow involves establishing several 'ssh -MNf'
} connections every morning

Are you running this on an Xorg desktop?  Some Xorg distributions set
up ssh-agent directly under the session manager so all applications
on the desktop use the same agent.  Unless you specifically need to
run a separate agent for this, you might check whether one is already
available.  I source a file from my .zlogin that looks like this
(details elided):

  (( SSH_AGENT_PID )) || return 0
  [[ $(ssh-add -L) = *"no identities"* ]] || return 0
  ssh-add ...

The ssh-add command in this setup is clever enough to invoke zenity or
gdialog or the equivalent to pop up a window for the password.  Have
you tried something like

    ssh-add ~/.ssh/foo.id_rsa </dev/null >>& .ssh-add-errors

to see if it finds some other way to prompt you?  If that works, then
you can just background the entire foo_ssh_preseed call, whether or
not you already have an ssh-agent for the desktop session.


  reply	other threads:[~2013-01-16 17:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-16  6:59 Daniel Shahaf
2013-01-16 17:35 ` Bart Schaefer [this message]
2013-01-18  6:18   ` Daniel Shahaf
2013-01-18  7:26     ` Bart Schaefer
2013-01-18 14:13       ` Daniel Shahaf
2013-01-18 15:35         ` Bart Schaefer
2013-01-21  3:58           ` Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=130116093514.ZM19656@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).