Git clone from remote repositorium with ssh and non default port

just a reminder, suppose your ssh port is 3022: (sometimes I swap the way to specify the port in those two commands)

git clone ssh://user@domain.com:3022/~/Projects/my_project

ssh user@domain.com -p 3022


(when connecting through ssh the non default port goes as param, the default port is 22)

2 Responses to “Git clone from remote repositorium with ssh and non default port”


  1. 1 Drakezila March 21, 2010 at 18:28

    Hey my friend thanks for this tip… my isp block the ssh default port so i couldn’t do that by the easy way :D

    i really sorry about my english… greetings from venezuela! bye bye!

  2. 2 Alex July 21, 2010 at 14:10

    You can also add the host to your ~/ssh/config so you don’t need to add the port every time you use ssh/git:

    Host *example.com
        Port 3022
    

Leave a Reply




Last Regedor’s twitts

  • @rubenfonseca cool, I just bought it! :) 1 day ago
  • tried Rails3 and ruby 1.9.2 and it's awesome, but too many gems are still incompatible. I' ll wait a little longer to get really into it. 2 days ago

Last Regedor's bookmarks