LINUX.ORG.RU

Не могу подключиться к github по ssh

 ,


0

1

Система Arch Linux оболочка xfce.


[sergey@sergeyM ~]$ ssh -vT git@github.com
OpenSSH_7.5p1, OpenSSL 1.1.0f  25 May 2017
debug1: Reading configuration data /home/sergey/.ssh/config
debug1: /home/sergey/.ssh/config line 1: Applying options for github.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to ssh.github.com [192.30.253.123] port 443.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/sergey/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sergey/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sergey/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sergey/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sergey/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sergey/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sergey/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sergey/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.5
debug1: Remote protocol version 2.0, remote software version libssh-0.7.0
debug1: no match: libssh-0.7.0
debug1: Authenticating to ssh.github.com:443 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
debug1: Host '[ssh.github.com]:443' is known and matches the RSA host key.
debug1: Found key in /home/sergey/.ssh/known_hosts:3
Warning: Permanently added the RSA host key for IP address '[192.30.253.123]:443' to the list of known hosts.
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/sergey/.ssh/id_rsa
debug1: Trying private key: /home/sergey/.ssh/id_dsa
debug1: Trying private key: /home/sergey/.ssh/id_ecdsa
debug1: Trying private key: /home/sergey/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey).

В чем может быть проблема?



Последнее исправление: allon925 (всего исправлений: 1)
ls -al ~/.ssh

А вообще на гитхабе вроде как ssh только для репозиториев, в щель провалиться нельзя.

l0stparadise ★★★★★
()
Последнее исправление: l0stparadise (всего исправлений: 1)
[sergey@sergeyM ~]$ ls -al ~/.ssh
итого 24
drwx------  2 sergey users 4096 июн 20 15:58 .
drwx------ 24 sergey users 4096 июн 20 15:33 ..
-rw-r--r--  1 root   root    53 июн 20 15:58 config
-rw-------  1 sergey users 1679 июн 20 15:33 id_rsa.sergeyM88
-rw-r--r--  1 sergey users  401 июн 20 15:33 id_rsa.sergeyM88.pub
-rw-r--r--  1 sergey users 1628 июн 20 16:02 known_hosts
allon925
() автор топика

Укажи свой ключ через опцию -i

anonymous
()
Ответ на: комментарий от allon925

Можно переименовать:

id_rsa.sergeyM88 => id_rsa
id_rsa.sergeyM88.pub => id_rsa.pub
Можно, конечно, указать на файл в конфиге, но, если ключ один, то разницы не будет.

xaizek ★★★★★
()
Ответ на: комментарий от xaizek

Переименовал


[sergey@sergeyM ~]$ ls -al ~/.ssh
итого 24
drwx------  2 sergey users 4096 июн 20 16:39 .
drwx------ 24 sergey users 4096 июн 20 15:33 ..
-rw-r--r--  1 root   root    53 июн 20 15:58 config
-rw-------  1 sergey users 1679 июн 20 15:33 id_rsa
-rw-r--r--  1 sergey users  401 июн 20 15:33 id_rsa.pub
-rw-r--r--  1 sergey users 1628 июн 20 16:02 known_hosts


allon925
() автор топика
Ответ на: комментарий от xaizek

Попробовал подключиться

[sergey@sergeyM ~]$ ssh -vT git@github.comOpenSSH_7.5p1, OpenSSL 1.1.0f  25 May 2017
debug1: Reading configuration data /home/sergey/.ssh/config
debug1: /home/sergey/.ssh/config line 1: Applying options for github.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to ssh.github.com [192.30.253.123] port 443.
debug1: Connection established.
debug1: identity file /home/sergey/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sergey/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sergey/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sergey/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sergey/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sergey/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sergey/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/sergey/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.5
debug1: Remote protocol version 2.0, remote software version libssh-0.7.0
debug1: no match: libssh-0.7.0
debug1: Authenticating to ssh.github.com:443 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
debug1: Host '[ssh.github.com]:443' is known and matches the RSA host key.
debug1: Found key in /home/sergey/.ssh/known_hosts:3
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/sergey/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentication succeeded (publickey).
Authenticated to ssh.github.com ([192.30.253.123]:443).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
Hi sergeyM88! You've successfully authenticated, but GitHub does not provide shell access.
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2664, received 1776 bytes, in 0.3 seconds
Bytes per second: sent 10375.2, received 6916.8
debug1: Exit status 1
allon925
() автор топика
Ответ на: комментарий от l0stparadise

Для своего репозитория имеется ввиду? А как я могу подключиться по этому ключу к своему репозиторию?

allon925
() автор топика
Ответ на: комментарий от allon925

Нет, только через гит, сказал же.

git clone git@github.com:USERNAME/REPOSITORY.git
l0stparadise ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.