我有一個sshj(使用sshj v0.6.0)的奇怪問題,因此我需要某個人的幫助。 使用公鑰進行身份驗證在一些機器上正常工作,但在其他機器上無法正常工作,我看到下面的錯誤。處理「[HOST_KEY_NOT_VERIFIABLE]無法驗證具有指紋的ssh-rsa主機密鑰」sshj
,我可以讓出唯一的區別是,UNIX ID的問題即coonradt似乎有下的〜/ .ssh/config中的下列配置設置只在其上下方的錯誤被觸發
箱Host *
Protocol 1,2
FallBackToRsh no
ForwardAgent yes
ForwardX11 yes
PasswordAuthentication yes
RhostsAuthentication no
RhostsRSAAuthentication no
RSAAuthentication yes
NoHostAuthenticationForLocalhost yes
StrictHostKeyChecking no
KeepAlive yes
從上面的配置文件中,我瞭解到有問題的ID應該使用協議1,2,我懷疑這可能與我的失敗有關(我對此不太確定,但這只是一個預感)
對於這個工作正常的所有其他UNIX ID,我沒有任何這樣的配置文件。
PS:我無法更改UNIX ID「coonradt」的配置,因爲中央哈德森服務器正在使用此ID。
將不勝感激,如果有人可以幫我建議,什麼可能是錯在這裏
下面是我看到的錯誤:
Oct 24, 2011 2:30:37 AM net.schmizz.sshj.DefaultConfig initCipherFactories
WARNING: Disabling high-strength ciphers: cipher strengths apparently limited by JCE policy
Oct 24, 2011 2:30:38 AM net.schmizz.sshj.transport.TransportImpl init
INFO: Client identity string: SSH-2.0-SSHJ_0_6_0
Oct 24, 2011 2:30:38 AM net.schmizz.sshj.transport.TransportImpl init
INFO: Server identity string: SSH-1.99-OpenSSH_4.3
Oct 24, 2011 2:30:38 AM net.schmizz.sshj.transport.KeyExchanger sendKexInit
INFO: Sending SSH_MSG_KEXINIT
Oct 24, 2011 2:30:38 AM net.schmizz.sshj.transport.KeyExchanger handle
INFO: Received SSH_MSG_KEXINIT
Oct 24, 2011 2:30:38 AM net.schmizz.sshj.transport.kex.AbstractDHG init
INFO: Sending SSH_MSG_KEXDH_INIT
Oct 24, 2011 2:30:38 AM net.schmizz.sshj.transport.KeyExchanger handle
INFO: Received kex followup data
Oct 24, 2011 2:30:38 AM net.schmizz.sshj.transport.kex.AbstractDHG next
INFO: Received SSH_MSG_KEXDH_REPLY
Oct 24, 2011 2:30:38 AM net.schmizz.sshj.transport.TransportImpl die
SEVERE: Dying because - net.schmizz.sshj.transport.TransportException: [HOST_KEY_NOT_VERIFIABLE] Could not verify `ssh-rsa` host key with fingerprint `ca:0b:b3:7f:53:5a:e3:bc:bf:44:63:d8:2d:26:c0:41` for `mymachine.domain.com` on port 22
Oct 24, 2011 2:30:38 AM net.schmizz.concurrent.Promise tryRetrieve
SEVERE: <<kex done>> woke to: net.schmizz.sshj.transport.TransportException: [HOST_KEY_NOT_VERIFIABLE] Could not verify `ssh-rsa` host key with fingerprint `ca:0b:b3:7f:53:5a:e3:bc:bf:44:63:d8:2d:26:c0:41` for `mymachine.domain.com` on port 22
Oct 24, 2011 2:30:38 AM net.schmizz.sshj.transport.TransportImpl setService
INFO: Setting active service to null-service
Oct 24, 2011 2:30:38 AM com.test.jaws.execution.ssh.impl.SSHJClientImpl$ExceptionHandler handleSevereCondition
SEVERE: mymachine.domain.com is not added to your /x/home/coonradt/.ssh/known_hosts file.
Throwable occurred: net.schmizz.sshj.transport.TransportException: [HOST_KEY_NOT_VERIFIABLE] Could not verify `ssh-rsa` host key with fingerprint `ca:0b:b3:7f:53:5a:e3:bc:bf:44:63:d8:2d:26:c0:41` for `mymachine.domain.com` on port 22
at net.schmizz.sshj.transport.KeyExchanger.verifyHost(KeyExchanger.java:222)
at net.schmizz.sshj.transport.KeyExchanger.handle(KeyExchanger.java:373)
at net.schmizz.sshj.transport.TransportImpl.handle(TransportImpl.java:477)
at net.schmizz.sshj.transport.Decoder.decode(Decoder.java:127)
at net.schmizz.sshj.transport.Decoder.received(Decoder.java:195)
at net.schmizz.sshj.transport.Reader.run(Reader.java:72)
我認爲問題確實與coonradt用戶配置有關,請參閱嚴重通知:「嚴重:mymachine.domain.com未添加到您的/x/home/coonradt/.ssh/known_hosts文件中。 「你應該修復這個問題;-) –
你好,非常感謝你的迅速回復,但是你能否建議你應該向用戶提供什麼修補程序?是否意味着我必須去掉協議我希望sshj能以某種方式讓我指定可以使用的協議版本(如果聽起來很亂,請耐心等待我的天真,但正如我在對內部知識不太瞭解之前所承認的那樣如何使用ssh) –
它實際上與協議實際上很少有關(事實上,就此消息而言,沒有什麼關係)。需要發生的事情是文件'/ x/home/coonradt /。在這種情況下,ssh/known_hosts'應該包含客戶端的指紋。我想你已經偶然發現了一種安全措施,並非每臺計算機都可以使用該用戶連接到該服務器。 –