SSH配置访问

文章目录

ssh -vvvT git@github.com

OpenSSH_9.9p2, LibreSSL 3.3.6

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 *

debug3: expanded UserKnownHostsFile ‘~/.ssh/known_hosts’ -> ‘/Users/kuolee/.ssh/known_hosts’

debug3: expanded UserKnownHostsFile ‘~/.ssh/known_hosts2’ -> ‘/Users/kuolee/.ssh/known_hosts2’

debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling

debug3: channel_clear_timeouts: clearing

debug1: Connecting to github.com port 22.

debug1: Connection established.

debug1: identity file /Users/kuolee/.ssh/id_rsa type 0

debug1: identity file /Users/kuolee/.ssh/id_rsa-cert type -1

debug1: identity file /Users/kuolee/.ssh/id_ecdsa type -1

debug1: identity file /Users/kuolee/.ssh/id_ecdsa-cert type -1

debug1: identity file /Users/kuolee/.ssh/id_ecdsa_sk type -1

debug1: identity file /Users/kuolee/.ssh/id_ecdsa_sk-cert type -1

debug1: identity file /Users/kuolee/.ssh/id_ed25519 type -1

debug1: identity file /Users/kuolee/.ssh/id_ed25519-cert type -1

debug1: identity file /Users/kuolee/.ssh/id_ed25519_sk type -1

debug1: identity file /Users/kuolee/.ssh/id_ed25519_sk-cert type -1

debug1: identity file /Users/kuolee/.ssh/id_xmss type -1

debug1: identity file /Users/kuolee/.ssh/id_xmss-cert type -1

debug1: identity file /Users/kuolee/.ssh/id_dsa type -1

debug1: identity file /Users/kuolee/.ssh/id_dsa-cert type -1

debug1: Local version string SSH-2.0-OpenSSH_9.9

kex_exchange_identification: Connection closed by remote host

Connection closed by 198.18.0.64 port 22

$ ssh -T git@github.com
ssh: connect to host github.com port 22: Connection refused

$ ssh -T -p 443 git@ssh.github.com

The authenticity of host ‘[ssh.github.com]:443 ([198.18.26.76]:443)’ can’t be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added ‘[ssh.github.com]:443’ (ED25519) to the list of known hosts.
Hi bigleek! You’ve successfully authenticated, but GitHub does not provide shell access.

kuolee at leek in ~
$ vi ~/.ssh/config

kuolee at leek in ~
$ ssh -T git@github.com
Hi bigleek! You’ve successfully authenticated, but GitHub does not provide shell access.