修改了服务器ssh默认端口,在mac下测试始终报错:
$ ssh -T git@centos-linux:222
ssh: Could not resolve hostname centos-linux:222: nodename nor servname provided, or not known
Mac下无法识别主机后面的端口号,换一种写法即可:
$ ssh -p 222 git@centos-linux
The authenticity of host '[centos-linux]:222 ([10.211.55.11]:222)' can't be established.
ECDSA key fingerprint is SHA256:B5lVLZf/QVdTZX9jT/S2PgZq8VaTzaolgoMxgMAJckA.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[centos-linux]:222,[10.211.55.11]:222' (ECDSA) to the list of known hosts.
PTY allocation request failed on channel 0
Welcome to GitLab, 葛方帅!
Connection to centos-linux closed.