Re: Access Git ssh on port 8822 ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx:/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@xxxxxxxxx: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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux