git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Leonardo Bozzi <leonardobozzi@gmail.com>, git@vger.kernel.org
Subject: Re: Access Git ssh on port 8822 ?
Date: Wed, 19 Sep 2018 22:04:56 +0200	[thread overview]
Message-ID: <87sh25jlsn.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <20180919175045.GA10005@sigill.intra.peff.net>


On Wed, Sep 19 2018, Jeff King wrote:

> On Wed, Sep 19, 2018 at 02:47:09PM -0300, Leonardo Bozzi wrote:
>
>> Good afternoon, I'm trying to set up a git server, but I want to use
>> ssh access to connect clients on my server, but because of a
>> limitation in my internet provider it blocks access from outside on
>> port 22, so I changed the same from ssh to 8822. But when I give the
>> command:
>> 
>> $git remote add origin bozzi@bozzi.net:/opt/gitcurso
>> 
>> The server blocks me because I would have to access via port 8822. How
>> do I make the connection correctly?
>
> You have two options:
>
>   1. You can use the more verbose ssh URL syntax, which allows a port
>      number:
>
>        git clone ssh://bozzi@bozzi.net:8822/opt/gitcurso
>
>   2. You can use a host block in your ~/.ssh/config to set the default
>      port for that host.
>
>        {
>          echo "Host bozzi.net"
> 	 echo "Port 8822"
>        } >>$HOME/.ssh/config
>
> -Peff

3. GIT_SSH_COMMAND="ssh -p 8822"  git clone bozzi@bozzi.net:/opt/gitcurso

      parent reply	other threads:[~2018-09-19 20:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-19 17:47 Access Git ssh on port 8822 ? Leonardo Bozzi
2018-09-19 17:50 ` Jeff King
2018-09-19 18:48   ` Leonardo Bozzi
2018-09-19 20:04   ` Ævar Arnfjörð Bjarmason [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sh25jlsn.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=leonardobozzi@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).