2016-06-10 129 views
1

我想從官方gitlab服務器訪問存儲庫。現在,我得到錯誤ssh_dispatch_run_fatal試圖ssh回購gitlab

ssh_dispatch_run_fatal: Connection to 104.210.2.228: no matching cipher found 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 

如果我試圖拉,克隆,甚至ssh [email protected]

我創建了一個新的密鑰,並進行了測試,以檢查密鑰是否是問題,但同樣的錯誤仍然存​​在。

我的系統的一些信息:

$ lsb_release -a 
Distributor ID: Ubuntu 
Description: Ubuntu 15.10 
Release: 15.10 
Codename: wily 

$ git --version 
git version 2.5.0 

$ ssh -vvvT [email protected] 
OpenSSH_6.9p1 Ubuntu-2ubuntu0.2, OpenSSL 1.0.2d 9 Jul 2015 
debug1: Reuserg configuration data /etc/ssh/ssh_config 
debug1: /etc/ssh/ssh_config line 19: Applying options for * 
debug2: ssh_connect: needpriv 0 
debug1: Connecting to gitlab.com [104.210.2.228] port 22. 
debug1: Connection established. 
debug1: identity file /home/user/.ssh/id_rsa type 1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/user/.ssh/id_rsa-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/user/.ssh/id_dsa type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/user/.ssh/id_dsa-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/user/.ssh/id_ecdsa type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/user/.ssh/id_ecdsa-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/user/.ssh/id_ed25519 type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/user/.ssh/id_ed25519-cert type -1 
debug1: Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_6.9p1 Ubuntu-2ubuntu0.2 
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.2p2 Ubuntu-4ubuntu1 
debug1: match: OpenSSH_7.2p2 Ubuntu-4ubuntu1 pat OpenSSH* compat 0x04000000 
debug2: fd 3 setting O_NONBLOCK 
debug1: Authenticating to gitlab.com:22 as 'git' 
debug1: SSH2_MSG_KEXINIT sent 
debug1: SSH2_MSG_KEXINIT received 
debug2: kex_parse_kexinit: [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 
debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,ssh-rsa,ssh-dss 
debug2: kex_parse_kexinit: blowfish-cbc,arcfour 
debug2: kex_parse_kexinit: blowfish-cbc,arcfour 
debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1,[email protected],[email protected],[email protected],[email protected],hmac-md5,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 
debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1,[email protected],[email protected],[email protected],[email protected],hmac-md5,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 
debug2: kex_parse_kexinit: [email protected],zlib,none 
debug2: kex_parse_kexinit: [email protected],zlib,none 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: kex_parse_kexinit: [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1 
debug2: kex_parse_kexinit: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519 
debug2: kex_parse_kexinit: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected] 
debug2: kex_parse_kexinit: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected] 
debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1 
debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1 
debug2: kex_parse_kexinit: none,[email protected] 
debug2: kex_parse_kexinit: none,[email protected] 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
ssh_dispatch_run_fatal: Connection to 104.210.2.228: no matching cipher found 

看來,我有一些錯誤或差異在OpenSSH的版本,但我不知道。任何指向正在發生的事情,以及如何解決它將不勝感激。

回答

2

沒有匹配的密碼發現

意味着你的服務器和客戶端提供了不同的密碼。

客戶端:

debug2: kex_parse_kexinit: blowfish-cbc,arcfour 

服務器端:

debug2: kex_parse_kexinit: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected] 

客戶端建議肯定不會默認值,因爲它們是不安全的密碼(任何理智的服務器上禁用)。您應檢查/etc/ssh/ssh_config和刪除行

Ciphers blowfish-cbc,arcfour 

或類似的(不管如何以及爲什麼它那裏)。如果需要舊的密碼連接到原有系統,總有相匹配塊,你可以在我的MacBook升級到HighSierra後使用這樣

Match legacy.hostmane 
    Ciphers blowfish-cbc,arcfour 
0

我得到類似的問題,而試圖在git的實驗室遠程連接。

無法與xx.xx.xx.xx端口協商xx:找不到匹配的密碼 。他們的報價:aes256-cbc,aes128-cbc致命:無法從 遠程存儲庫讀取。

要解決此問題,只需編輯/etc/ssh/ssh_config文件即可添加支持服務器配置的密碼。

這可以簡單地通過刪除前面的#字符來取消註釋行# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc來完成。

由於ssh文件夾具有訪問限制,請使用vim編輯器或在桌面等某處創建該文件的副本並進行更改,然後在/ etc/ssh /文件夾中進行替換。

+0

然後你有一個完全不同(相反)的問題。 – Jakuje