ssh-keygen 回车Generating public/private rsa key pair.
Enter file in which to save the key (/Users/admin/.ssh/id_rsa): demo_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in demo_rsa.
Your public key has been saved in demo_rsa.pub.
The key fingerprint is:
30:de:c3:ac:35:41:26:f0:86:42:8e:fa:3c:f6:04:59 admin@admindeMac-mini.local
The key's randomart image is:
+--[ RSA 2048]----+
| . ... o |
| + o + |
|. o E = . |
|. + o * . |
|. o . S |
| o . o o |
| = . . |
| . + |
| . |
+-----------------+
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to github.com [192.30.252.128] port 22.
debug1: Connection established.
debug1: identity file wsw_rsa type 1
debug1: identity file wsw_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version libssh-0.6.3
debug1: no match: libssh-0.6.3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-sha1 none
debug1: kex: client->server aes128-ctr hmac-sha1 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Server host key: RSA 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in /Users/admin/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: wsw_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
Authenticated to github.com ([192.30.252.128]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = zh_CN.UTF-8
PTY allocation request failed on channel 0
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
Hi redparrots/cpp2txt! You've successfully authenticated, but GitHub does not provide shell access.
debug1: channel 0: free: client-session, nchannels 1
Connection to github.com closed.
Transferred: sent 3448, received 1968 bytes, in 0.9 seconds
Bytes per second: sent 3796.5, received 2166.9
debug1: Exit status 1
出现绿色部分,说明授权成功。
如出现 .... debug1: Offering RSA public key: /Users/admin/.ssh/id_rsa debug1: Authentications that can continue: publickey debug1: Trying private key: /Users/admin/.ssh/id_dsa debug1: No more authentication methods to try. Permission denied (publickey).