Summary: ssh-agent problem

From: David Baldwin <dbaldwin_at_networkinsight.com>
Date: Thu Nov 08 2001 - 18:00:07 EST
Thanks for your help Dan

Putting quotes around the variable did the trick.

Thanks again
Dave


> -----Original Message-----
> From: Dan Astoorian [mailto:djast@cs.toronto.edu]
> Sent: Thursday, November 08, 2001 2:21 PM
> To: David Baldwin
> Subject: Re: ssh-agent problem
>=20
> On Thu, 08 Nov 2001 17:06:32 EST, "David Baldwin" writes:
> > #!/bin/bash
> > if [ -z $SSH_CLIENT ]
> > then
> >         eval `/usr/local/bin/ssh-agent`; /usr/local/bin/ssh-add
> > ~/.ssh/id_rsa  ~/.ssh/id_dsa
> > fi
> >
> [...]
> > [: too many arguments
>=20
> $SSH_CLIENT, when it's set, has spaces in it, so your script
> effectively reads
>     if [ -z AA.BB.CC.DD PPPPP 22 ]
>=20
> after the variable has been expanded.  Put quotes around the variable,
> i.e.,
>     if [ -z "$SSH_CLIENT" ]
>=20
> Hope this helps.
>=20
> --
> Dan Astoorian               People shouldn't think that it's better to
> have
> Sysadmin, CSLab             loved and lost than never loved at all.
It's
> djast@cs.toronto.edu        not, it's better to have loved and won.
All
> www.cs.toronto.edu/~djast/  the other options really suck.    --Dan
> Redican
Received on Thu Nov 8 23:00:07 2001

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:32:35 EDT