[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ssh-agent (was: using a remote IMAP server and smarthost)



On Thu, Aug 30, 2007 at 01:00:44AM +0200, Florian Kulzer wrote:

> On Tue, Aug 28, 2007 at 20:09:03 +0100, Richard Lyons wrote:
> > On Sun, Aug 26, 2007 at 12:27:32AM +0200, Florian Kulzer wrote:
> > > # activated by this option in ~/.muttrc:
> > > # set sendmail="/path/to/sendmail-via-ssh.sh"
> > > 
> > > cat - | ssh myvm "/usr/sbin/sendmail -oem -oi $@"
[...]
> > I assume this script is intended to address a real sendmail or exim4,
> > rather than the msmtp installed for the trial of method 1.  As I read
> > the manual, the -oem -oi options are not relevant to msmtp.
> 
> Yes, it should just be
> 
> cat - | ssh myvm "/usr/bin/msmtp $@"
[...]
> 
> > So I think I really need the ssh-agent.  Help anybody?
> 
> Ssh-agent is part of the openssh-client package. It should be started
> with every X session by the /etc/X11/Xsession.d/90x11-common_ssh-agent
> script. (See "ps -e | grep ssh-agent".)

Oh yes, I see it is set up to start if available...
> 
> However, ssh-agent needs a frontend to handle the interaction with the
> user when a passphrase for a private key has to be entered. This seems
> to be what you are missing. Install one of the packages that provide
> "ssh-askpass":

I installed gtk-led-askpass and added a line "/usr/bin/gtk-led-askpass" in
~/GNUstep/Library/WindowMaker/autostart, but this simply caused Xwindows
to open in a frozen state (waiting for my response on a non-visible
window, I assume since the ssh-agent process was running). This is
probably easy enough to resolve, but it will still require me to enter
the reasonably secure passphrase (read "excessively long") that I chose,
so perhaps I shall stay with method 1, the ssh tunnel, which works
easily enough.

The only thing that would make it more convenient still would be if I
could see how to write scripts to open and close the tunnel.  They would
need to check if it is already open first.  When opening or closing the
tunnel the scripts would also set sendmail= apropriately.  Then I could
map them to hotkeys in mutt.  When I am attached to our home network, I
can send direct, but when I am on a laptop elsewhere or in Italy I need
to use the tunnelling.  So the possibility of easy switching would be
useful.

-- 
richard



Reply to: