我正在尝试使用 Mac 的非标准端口连接到 GitLab 实例。我研究了 .ssh/config 文档并尝试了不同的选项,我认为我的配置还可以,但 ssh 仍然使用端口 22。
ssh -vv gitlab.braemer.myds.me
OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/andrey/.ssh/config
debug1: /Users/andrey/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to gitlab.braemer.myds.me port 22.
ssh: connect to host gitlab.braemer.myds.me port 22: Connection refused
配置在这里:
cat ~/.ssh/config
Host *
Port 22
Host github.com-irondad
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_2
IdentitiesOnly yes
Host gitlab.braemer
HostName gitlab.braemer.myds.me
User git
IdentityFile ~/.ssh/id_rsa
IdentitiesOnly yes
Port 87111
有什么想法有什么问题吗?