# SSH keys location

2 messages from 2010-04-22 to 2010-04-22. Participants: Mahesh Vaidya, Shawn O. Pearce.
Thread: https://gitlist.dev/t/23567

## Mahesh Vaidya, 2010-04-22 18:40

Subject: SSH keys location
Message-ID: <v2rb42431c81004221140n31c76030m74656d01950b8ae0@mail.gmail.com>
URL: https://gitlist.dev/e/v2rb42431c81004221140n31c76030m74656d01950b8ae0%40mail.gmail.com

```
Hi

I have a situation where I must save my private keys location other
than ~/.ssh ; How do I tell git URL that please take public key from
so and so location equivalent of ssh -i <identity-file> flag

example my clone command is

git clone gitosis@server:repos.git

Thank You

-Mahesh

```

## Shawn O. Pearce, 2010-04-22 18:42

Subject: Re: SSH keys location
Message-ID: <20100422184239.GA29426@spearce.org>
URL: https://gitlist.dev/e/20100422184239.GA29426%40spearce.org
In-Reply-To: <v2rb42431c81004221140n31c76030m74656d01950b8ae0@mail.gmail.com>

```
Mahesh Vaidya <forvaidya@gmail.com> wrote:
> I have a situation where I must save my private keys location other
> than ~/.ssh ; How do I tell git URL that please take public key from
> so and so location equivalent of ssh -i <identity-file> flag
> 
> example my clone command is
> 
> git clone gitosis@server:repos.git

Just use ~/.ssh/config to rewrite the options:

  Host server
    IdentityFile /some/private/key/path

-- 
Shawn.

```
