Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Backgrounding part of 'ssh-agent $cmd'
- X-seq: zsh-users 17572
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Backgrounding part of 'ssh-agent $cmd'
- Date: Wed, 16 Jan 2013 09:35:14 -0800
- In-reply-to: <20130116065951.GA2992@lp-shahaf.local>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author