Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Re: How can I specify a non-standard TCP port for a git+ssh connection?

From: <hidden>
Date: 2016-06-15 22:42:14

Actually, you don't need any git support.  ssh allows you to set up
"virtual hosts" with any combination of options you like.

Host <virtual>
        HostName <physical>
	Port <nonstandard>
        User <whoever>
        IdentityFile    <custom>
        ForwardAgent    no

So typing "ssh <virtual>" will have the effect of
ssh <whoever>@<physical> -p <nonstandard> -i <custom> -a

Quite often, you let <virtual> == <physical>, so it's "custom settings
for talking to this host", but you can have multiple different virtual
names that all map to the same physical host.

But the point is that as long as you can pass a hostname through to ssh,
you can carry as many custom settings as you like with it.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help