Hi,
在用 SSH 连接一台 Linux 服务器 OpenSSH 的时候,出现错误,
1939 [main] DEBUG com.sshtools.j2ssh.transport.publickey.SshKeyPairFactory - The default public key is not set! using first in list.
从上面提示来看,好像是要在连接的时候提供 Public Key ?
这些连接所需的 key 在同一个目录下, private key 的文件名是 id_dsa, public key 对应的文件名是 id_dsa.pub,
还有一个 authorized_keys 不知是什么用,
现在尝试连接的时候,只使用到了一个 id_dsa 的文件,其他文件没用上,
请大家帮下忙看下,是不是还有什么需要设置?
下面是输出结果,供参考:
481 [main] INFO com.sshtools.j2ssh.transport.cipher.SshCipherFactory - Loading supported cipher algorithms
1307 [main] INFO com.sshtools.j2ssh.transport.kex.SshKeyExchangeFactory - Loading key exchange methods
1335 [main] INFO com.sshtools.j2ssh.configuration.ConfigurationLoader - JAVA version is 1.6.0_22
1339 [main] INFO com.sshtools.j2ssh.configuration.ConfigurationLoader - Extension C:\Program Files (x86)\Java\jdk1.6.0_22\jre\lib\ext\dnsns.jar being added to classpath
1356 [main] INFO com.sshtools.j2ssh.util.ExtensionClassLoader - Adding C:\Program Files (x86)\Java\jdk1.6.0_22\jre\lib\ext\dnsns.jar to the extension classpath
1356 [main] INFO com.sshtools.j2ssh.configuration.ConfigurationLoader - Extension C:\Program Files (x86)\Java\jdk1.6.0_22\jre\lib\ext\localedata.jar being added to classpath
1365 [main] INFO com.sshtools.j2ssh.util.ExtensionClassLoader - Adding C:\Program Files (x86)\Java\jdk1.6.0_22\jre\lib\ext\localedata.jar to the extension classpath
1365 [main] INFO com.sshtools.j2ssh.configuration.ConfigurationLoader - Extension C:\Program Files (x86)\Java\jdk1.6.0_22\jre\lib\ext\sunjce_provider.jar being added to classpath
1388 [main] INFO com.sshtools.j2ssh.util.ExtensionClassLoader - Adding C:\Program Files (x86)\Java\jdk1.6.0_22\jre\lib\ext\sunjce_provider.jar to the extension classpath
1388 [main] INFO com.sshtools.j2ssh.configuration.ConfigurationLoader - Extension C:\Program Files (x86)\Java\jdk1.6.0_22\jre\lib\ext\sunmscapi.jar being added to classpath
1413 [main] INFO com.sshtools.j2ssh.util.ExtensionClassLoader - Adding C:\Program Files (x86)\Java\jdk1.6.0_22\jre\lib\ext\sunmscapi.jar to the extension classpath
1413 [main] INFO com.sshtools.j2ssh.configuration.ConfigurationLoader - Extension C:\Program Files (x86)\Java\jdk1.6.0_22\jre\lib\ext\sunpkcs11.jar being added to classpath
1435 [main] INFO com.sshtools.j2ssh.util.ExtensionClassLoader - Adding C:\Program Files (x86)\Java\jdk1.6.0_22\jre\lib\ext\sunpkcs11.jar to the extension classpath
1435 [main] DEBUG com.sshtools.j2ssh.transport.kex.SshKeyExchangeFactory - The default key exchange is not set! using first in list
1439 [main] INFO com.sshtools.j2ssh.transport.publickey.SshKeyPairFactory - Loading public key algorithms
1464 [main] DEBUG com.sshtools.j2ssh.transport.publickey.SshKeyPairFactory - The default public key is not set! using first in list
1466 [main] INFO com.sshtools.j2ssh.transport.compression.SshCompressionFactory - Loading compression methods
1477 [main] INFO com.sshtools.j2ssh.transport.hmac.SshHmacFactory - Loading message authentication methods
1665 [main] INFO com.sshtools.j2ssh.transport.TransportProtocolCommon - Starting transport protocol
1670 [Transport protocol 1] INFO com.sshtools.j2ssh.transport.TransportProtocolCommon - Registering transport protocol messages with inputstream
3113 [Transport protocol 1] INFO com.sshtools.j2ssh.transport.TransportProtocolCommon - Negotiating protocol version
3113 [Transport protocol 1] DEBUG com.sshtools.j2ssh.transport.TransportProtocolCommon - Local identification: SSH-2.0-http://www.sshtools.com J2SSH [CLIENT]
3114 [Transport protocol 1] DEBUG com.sshtools.j2ssh.transport.TransportProtocolCommon - EOL is guessed at LF
3114 [Transport protocol 1] DEBUG com.sshtools.j2ssh.transport.TransportProtocolCommon - Remote identification: SSH-2.0-OpenSSH_4.3
3114 [Transport protocol 1] INFO com.sshtools.j2ssh.transport.TransportProtocolCommon - Protocol negotiation complete
3115 [Transport protocol 1] DEBUG com.sshtools.j2ssh.transport.TransportProtocolCommon - SshMsgKexInit:
Supported Kex [diffie-hellman-group1-sha1]