# can't push to ransom ssh port ?

6 messages from 2008-07-04 to 2008-07-04. Participants: Neshama Parhoti, Denis Bueno, Johannes Schindelin, Vaclav Hanzl.
Thread: https://gitlist.dev/t/14287

## Neshama Parhoti, 2008-07-04 13:28

Subject: can't push to ransom ssh port ?
Message-ID: <912ec82a0807040628k14c8acd1ree9d82b68f69e080@mail.gmail.com>
URL: https://gitlist.dev/e/912ec82a0807040628k14c8acd1ree9d82b68f69e080%40mail.gmail.com

```
Hi all,

Doing the following:

git push myuser@myip:~/gitrepo

Connects to ssh port 22 on myip.

Is there a way to tell git to connect to a random port X ?

(something like ssh's -p parameter)

I can't find how and I really need that..

Thank you!
pnesh

```

## Johannes Schindelin, 2008-07-04 13:32

Subject: Re: can't push to ransom ssh port ?
Message-ID: <alpine.DEB.1.00.0807041432060.9925@racer>
URL: https://gitlist.dev/e/alpine.DEB.1.00.0807041432060.9925%40racer
In-Reply-To: <912ec82a0807040628k14c8acd1ree9d82b68f69e080@mail.gmail.com>

```
Hi,

On Fri, 4 Jul 2008, Neshama Parhoti wrote:

> Doing the following:
> 
> git push myuser@myip:~/gitrepo
> 
> Connects to ssh port 22 on myip.
> 
> Is there a way to tell git to connect to a random port X ?

You could use a URL like "ssh://myuser@myip:X/home/myuser/gitrepo".

Hth,
Dscho

```

## Denis Bueno, 2008-07-04 13:33

Subject: Re: can't push to ransom ssh port ?
Message-ID: <6dbd4d000807040633l6210e0cdtf37293ba44a52374@mail.gmail.com>
URL: https://gitlist.dev/e/6dbd4d000807040633l6210e0cdtf37293ba44a52374%40mail.gmail.com
In-Reply-To: <912ec82a0807040628k14c8acd1ree9d82b68f69e080@mail.gmail.com>

```
On Fri, Jul 4, 2008 at 09:28, Neshama Parhoti <pneshama@gmail.com> wrote:
> Is there a way to tell git to connect to a random port X ?

>From the man page for git-push (git push --help):

   One of the following notations can be used to name the remote repository:

   ....
   o ssh://[user@]host.xz[:port]/path/to/repo.git/

-- 
                              Denis

```

## Vaclav Hanzl, 2008-07-04 13:35

Subject: Re: can't push to ransom ssh port ?
Message-ID: <20080704.153555.71091133.hanzl@noel.feld.cvut.cz>
URL: https://gitlist.dev/e/20080704.153555.71091133.hanzl%40noel.feld.cvut.cz
In-Reply-To: <912ec82a0807040628k14c8acd1ree9d82b68f69e080@mail.gmail.com>

```
> Is there a way to tell git to connect to a random port X ?
> 
> (something like ssh's -p parameter)

It can also be done using ~/.ssh/config with this:

Host a.b.c.d
Port 12345

(see man ssh_config), this way you just need to do it at one place for
ssh, scp and all git repositories.

Regards

Vaclav

```

## Neshama Parhoti, 2008-07-04 13:39

Subject: Re: can't push to ransom ssh port ?
Message-ID: <912ec82a0807040639mac82958i9a9aea9e5dc22e36@mail.gmail.com>
URL: https://gitlist.dev/e/912ec82a0807040639mac82958i9a9aea9e5dc22e36%40mail.gmail.com
In-Reply-To: <6dbd4d000807040633l6210e0cdtf37293ba44a52374@mail.gmail.com>

```
Thanks ! somehow I missed that..

```

## Neshama Parhoti, 2008-07-04 13:55

Subject: Re: can't push to ransom ssh port ?
Message-ID: <912ec82a0807040655q6993c998n60cbbe44efebb2fd@mail.gmail.com>
URL: https://gitlist.dev/e/912ec82a0807040655q6993c998n60cbbe44efebb2fd%40mail.gmail.com
In-Reply-To: <20080704.153555.71091133.hanzl@noel.feld.cvut.cz>

```
Thanks.

```
