threads / discuss / 14287

can't push to ransom ssh port ?

Subject: can't push to ransom ssh port ?

## tl;dr

6 messages between Jul 4, 2008 and Jul 4, 2008.

replies: 5people: 4as markdown or json

Neshama Parhoti· Jul 4, 2008, 13:28 UTC · lore
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· Jul 4, 2008, 13:32 UTC · re: Neshama Parhoti · lore

Re: can't push to ransom ssh port ?

Hi,
On Fri, 4 Jul 2008, Neshama Parhoti wrote:
Show 7 quoted lines
> 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· Jul 4, 2008, 13:33 UTC · re: Neshama Parhoti · lore

Re: can't push to ransom ssh port ?

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· Jul 4, 2008, 13:35 UTC · re: Neshama Parhoti · lore

Re: can't push to ransom ssh port ?

> 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

← back to recent threads