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
> 
> 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
> 
> $SSH_CLIENT, when it's set, has spaces in it, so your script
> effectively reads
>     if [ -z AA.BB.CC.DD PPPPP 22 ]
> 
> after the variable has been expanded.  Put quotes around the variable,
> i.e.,
>     if [ -z "$SSH_CLIENT" ]
> 
> Hope this helps.
> 
> --
> 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
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Thu Nov 8 17:02:11 2001

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:27 EST