{"thread":{"id":"49386","subject":"Access Git ssh on port 8822 ?","startedAt":"2018-09-19T17:47:25Z","lastAt":"2018-09-19T20:05:02Z","messageCount":4,"participants":["Leonardo Bozzi","Jeff King","Ævar Arnfjörð Bjarmason"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"358469","messageId":"CACrY0PAM=Ek5T_3oYkT0zMoAsULDfu9JAYm3xJdEqaxvxpQiwQ@mail.gmail.com","threadId":"49386","inReplyTo":null,"subject":"Access Git ssh on port 8822 ?","fromName":"Leonardo Bozzi","fromEmail":"leonardobozzi@gmail.com","sentAt":"2018-09-19T17:47:09Z","receivedAt":"2018-09-19T17:47:25Z","isPatch":false,"sender":{"key":"leonardobozzi@gmail.com","avatar":null},"body":"Good afternoon, I'm trying to set up a git server, but I want to use\nssh access to connect clients on my server, but because of a\nlimitation in my internet provider it blocks access from outside on\nport 22, so I changed the same from ssh to 8822. But when I give the\ncommand:\n\n$git remote add origin bozzi@bozzi.net:/opt/gitcurso\n\nThe server blocks me because I would have to access via port 8822. How\ndo I make the connection correctly?\n\nI'm Debian user.\n"},{"id":"358471","messageId":"20180919175045.GA10005@sigill.intra.peff.net","threadId":"49386","inReplyTo":"CACrY0PAM=Ek5T_3oYkT0zMoAsULDfu9JAYm3xJdEqaxvxpQiwQ@mail.gmail.com","subject":"Re: Access Git ssh on port 8822 ?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-09-19T17:50:45Z","receivedAt":"2018-09-19T17:50:48Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Sep 19, 2018 at 02:47:09PM -0300, Leonardo Bozzi wrote:\n\n> Good afternoon, I'm trying to set up a git server, but I want to use\n> ssh access to connect clients on my server, but because of a\n> limitation in my internet provider it blocks access from outside on\n> port 22, so I changed the same from ssh to 8822. But when I give the\n> command:\n> \n> $git remote add origin bozzi@bozzi.net:/opt/gitcurso\n> \n> The server blocks me because I would have to access via port 8822. How\n> do I make the connection correctly?\n\nYou have two options:\n\n  1. You can use the more verbose ssh URL syntax, which allows a port\n     number:\n\n       git clone ssh://bozzi@bozzi.net:8822/opt/gitcurso\n\n  2. You can use a host block in your ~/.ssh/config to set the default\n     port for that host.\n\n       {\n         echo \"Host bozzi.net\"\n\t echo \"Port 8822\"\n       } >>$HOME/.ssh/config\n\n-Peff\n"},{"id":"358476","messageId":"CACrY0PDzo8EayzV6Zg1jWALu-9m+txkp87un0SbMr3hVUynrOA@mail.gmail.com","threadId":"49386","inReplyTo":"20180919175045.GA10005@sigill.intra.peff.net","subject":"Re: Access Git ssh on port 8822 ?","fromName":"Leonardo Bozzi","fromEmail":"leonardobozzi@gmail.com","sentAt":"2018-09-19T18:48:58Z","receivedAt":"2018-09-19T18:49:14Z","isPatch":false,"sender":{"key":"leonardobozzi@gmail.com","avatar":null},"body":"Ok\n       git clone ssh://bozzi@bozzi.net:8822/opt/gitcurso\n\naccess sucess.\n\n\n\nAdm. Leonardo Bozzi\nAdministrador / Analista de Sistemas\nTel.:  (27) 99988-4576\nCRA-ES: 13256\n\n\nEm qua, 19 de set de 2018 às 14:50, Jeff King <peff@peff.net> escreveu:\n>\n> On Wed, Sep 19, 2018 at 02:47:09PM -0300, Leonardo Bozzi wrote:\n>\n> > Good afternoon, I'm trying to set up a git server, but I want to use\n> > ssh access to connect clients on my server, but because of a\n> > limitation in my internet provider it blocks access from outside on\n> > port 22, so I changed the same from ssh to 8822. But when I give the\n> > command:\n> >\n> > $git remote add origin bozzi@bozzi.net:/opt/gitcurso\n> >\n> > The server blocks me because I would have to access via port 8822. How\n> > do I make the connection correctly?\n>\n> You have two options:\n>\n>   1. You can use the more verbose ssh URL syntax, which allows a port\n>      number:\n>\n>        git clone ssh://bozzi@bozzi.net:8822/opt/gitcurso\n>\n>   2. You can use a host block in your ~/.ssh/config to set the default\n>      port for that host.\n>\n>        {\n>          echo \"Host bozzi.net\"\n>          echo \"Port 8822\"\n>        } >>$HOME/.ssh/config\n>\n> -Peff\n"},{"id":"358483","messageId":"87sh25jlsn.fsf@evledraar.gmail.com","threadId":"49386","inReplyTo":"20180919175045.GA10005@sigill.intra.peff.net","subject":"Re: Access Git ssh on port 8822 ?","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2018-09-19T20:04:56Z","receivedAt":"2018-09-19T20:05:02Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Wed, Sep 19 2018, Jeff King wrote:\n\n> On Wed, Sep 19, 2018 at 02:47:09PM -0300, Leonardo Bozzi wrote:\n>\n>> Good afternoon, I'm trying to set up a git server, but I want to use\n>> ssh access to connect clients on my server, but because of a\n>> limitation in my internet provider it blocks access from outside on\n>> port 22, so I changed the same from ssh to 8822. But when I give the\n>> command:\n>> \n>> $git remote add origin bozzi@bozzi.net:/opt/gitcurso\n>> \n>> The server blocks me because I would have to access via port 8822. How\n>> do I make the connection correctly?\n>\n> You have two options:\n>\n>   1. You can use the more verbose ssh URL syntax, which allows a port\n>      number:\n>\n>        git clone ssh://bozzi@bozzi.net:8822/opt/gitcurso\n>\n>   2. You can use a host block in your ~/.ssh/config to set the default\n>      port for that host.\n>\n>        {\n>          echo \"Host bozzi.net\"\n> \t echo \"Port 8822\"\n>        } >>$HOME/.ssh/config\n>\n> -Peff\n\n3. GIT_SSH_COMMAND=\"ssh -p 8822\"  git clone bozzi@bozzi.net:/opt/gitcurso\n"}]}