From: Jeff King <peff@peff.net>
To: Leonardo Bozzi <leonardobozzi@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Access Git ssh on port 8822 ?
Date: Wed, 19 Sep 2018 13:50:45 -0400 [thread overview]
Message-ID: <20180919175045.GA10005@sigill.intra.peff.net> (raw)
In-Reply-To: <CACrY0PAM=Ek5T_3oYkT0zMoAsULDfu9JAYm3xJdEqaxvxpQiwQ@mail.gmail.com>
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
next prev parent reply other threads:[~2018-09-19 17:50 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 [this message]
2018-09-19 18:48 ` Leonardo Bozzi
2018-09-19 20:04 ` Ævar Arnfjörð Bjarmason
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=20180919175045.GA10005@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=leonardobozzi@gmail.com \
/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).