WildDev
WildDev

Reputation: 2367

Does Git have built-in SSH server?

I'm trying to setup Git's remote SSH server to access this using SSH, but I haven't found any info how to make this.

Does Git has built-in SSH tools to establish such connection to use this "right out of the box"? Or should I use some third-party one?

Upvotes: 4

Views: 979

Answers (2)

abligh
abligh

Reputation: 25129

Git does not have an inbuilt ssh server. Git assumes that

  • the git client can use the ssh binary to initiate an ssh connection
  • the git server (at least on Unix) can be invoked as a command run from the ssh server.

You are probably familiar with the syntax

ssh foo.bar baz

which runs baz on foo.bar. The git client uses a similar configuration to run the ssh server which in turn runs the server-side git binary (the same binary as the client but run with different flags). Normally you would have a git user to do this. You can do this without any programs other than ssh and git (see first answer here) but you may find installing gitolite makes things easier (in essence your git server config is also stored in a git repo, so you don't have to do any server side maintenance by logging in).

Upvotes: 3

ckruczek
ckruczek

Reputation: 2410

No, I am sorry. You need to install appropriate ssh tools(like openssh) and configure your server to allow ssh. After that you just init a bare repository on your server and copy your ssh-key to your server.

Upvotes: 1

Related Questions