```shell $ ssh -vT -p 443 git@ssh.github.com OpenSSH_8.6p1, LibreSSL 3.3.6 debug1: Reading configuration data /Users/gan/.ssh/config debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files debug1: /etc/ssh/ssh_config line 54: Applying options for * debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling debug1: Connecting to ssh.github.com port 443. debug1: Connection established.
可以看到连接没有问题。
2. 在 SSH 配置文件中设置此行为。
1 2 3 4
Host github.com Hostname ssh.github.com Port 443 User git
验证
1 2
$ ssh -T git@github.com Hi LuShan123888! You've successfully authenticated, but GitHub does not provide shell access.