threads / discuss / 38663

does the git over ssh protocol tell the server the hostname?

Subject: does the git over ssh protocol tell the server the hostname?

## tl;dr

2 messages between Feb 26, 2015 and Mar 1, 2015.

replies: 1people: 2as markdown or json

Christoph Anton Mitterer· Feb 26, 2015, 23:14 UTC · lore
Hey.
Short question:

I saw that when plain git (i.e. git://) is used, the client tells the server the hostname specified on the client side. For http one has the same automatically via http's Host: header.

But after watching the git's over-ssh protocol, I couldn't find anything like that there? :-(

Would be quite nice to have this in order to implement vhosting like things.

Cheers, Chris.

Shawn Pearce· Mar 1, 2015, 00:41 UTC · re: Christoph Anton Mitterer · lore

Re: does the git over ssh protocol tell the server the hostname?

On Thu, Feb 26, 2015 at 3:14 PM, Christoph Anton Mitterer <calestyo@scientia.net> wrote:

Show 7 quoted lines
>
> I saw that when plain git (i.e. git://) is used, the client tells the
> server the hostname specified on the client side.
> For http one has the same automatically via http's Host: header.
>
> But after watching the git's over-ssh protocol, I couldn't find anything
> like that there? :-(
No, it does not send the host name.

The host name in SSH that Git sees could be an alias in the user's ~/.ssh/config file that is rewritten to a different host. So virtual hosting keying off that could be confusing since the end user expects to have more control over it than they do with git:// or https:// where the host name is usually a DNS record the user does not control.

← back to recent threads