{"thread":{"id":"38663","subject":"does the git over ssh protocol tell the server the hostname?","startedAt":"2015-02-26T23:14:54Z","lastAt":"2015-03-01T00:41:37Z","messageCount":2,"participants":["Christoph Anton Mitterer","Shawn Pearce"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"256724","messageId":"1424992494.4663.28.camel@scientia.net","threadId":"38663","inReplyTo":null,"subject":"does the git over ssh protocol tell the server the hostname?","fromName":"Christoph Anton Mitterer","fromEmail":"calestyo@scientia.net","sentAt":"2015-02-26T23:14:54Z","receivedAt":"2015-02-26T23:14:54Z","isPatch":false,"sender":{"key":"calestyo@scientia.net","avatar":"https://gravatar.com/avatar/74cd78048081efac1fcd21e681751ed55968f949a50e33adbe1a41c572a605cd?d=mp&s=160"},"body":"Hey.\n\nShort question:\n\nI saw that when plain git (i.e. git://) is used, the client tells the\nserver the hostname specified on the client side.\nFor http one has the same automatically via http's Host: header.\n\nBut after watching the git's over-ssh protocol, I couldn't find anything\nlike that there? :-(\n\nWould be quite nice to have this in order to implement vhosting like\nthings.\n\nCheers,\nChris.\n"},{"id":"256786","messageId":"CAJo=hJtgYp53UMXA0x32TRz2y7jynuE6b31fvuNWJ2FH=iMWuA@mail.gmail.com","threadId":"38663","inReplyTo":"1424992494.4663.28.camel@scientia.net","subject":"Re: does the git over ssh protocol tell the server the hostname?","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2015-03-01T00:41:37Z","receivedAt":"2015-03-01T00:41:37Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"On Thu, Feb 26, 2015 at 3:14 PM, Christoph Anton Mitterer\n<calestyo@scientia.net> wrote:\n>\n> I saw that when plain git (i.e. git://) is used, the client tells the\n> server the hostname specified on the client side.\n> For http one has the same automatically via http's Host: header.\n>\n> But after watching the git's over-ssh protocol, I couldn't find anything\n> like that there? :-(\n\nNo, it does not send the host name.\n\nThe host name in SSH that Git sees could be an alias in the user's\n~/.ssh/config file that is rewritten to a different host. So virtual\nhosting keying off that could be confusing since the end user expects\nto have more control over it than they do with git:// or https://\nwhere the host name is usually a DNS record the user does not control.\n"}]}