git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Access Git ssh on port 8822 ?

From
Jeff King <peff@peff.net>
Date
Sep 19, 2018, 17:50 UTC
Message-ID
<20180919175045.GA10005@sigill.intra.peff.net>
In-Reply-To
<CACrY0PAM=Ek5T_3oYkT0zMoAsULDfu9JAYm3xJdEqaxvxpQiwQ@mail.gmail.com>
On Wed, Sep 19, 2018 at 02:47:09PM -0300, Leonardo Bozzi wrote:
Show 10 quoted lines
> 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
Previous: Leonardo BozziNext: Leonardo Bozzi
Message 2 of 4 in “Access Git ssh on port 8822 ?”
  1. Leonardo BozziSep 19, 2018
  2. Jeff KingSep 19, 2018
  3. Leonardo BozziSep 19, 2018
  4. Ævar Arnfjörð BjarmasonSep 19, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.