Results 1 to 1 of 1
Thread: J2SSH & file 'known_hosts'
- 01-19-2010, 11:37 AM #1
Member
- Join Date
- Jan 2010
- Posts
- 1
- Rep Power
- 0
J2SSH & file 'known_hosts'
Hi
I have created a Java program that transfers a file to a remote server via ssh. For that I use the jar file 'j2ssh-core-0.2.9'.
This Java program is runned by an ANT-script from a linux server.
I would like not to confirm every time that I allow the host key: Do you want to allow this host key? [Yes|No]: Always option disabled, host file is not writeable
It seems the public key of the remote can't be written on the client server...
1) Should a 'known_hosts' file be present in the /etc/ssh/ dir? (There is no such file present in the client server where I run the ANT-script)
2) I get the following warning: WARN com.sshtools.j2ssh.transport.HostKeyVerification - Not enough permission to load a hosts file, so just creating an empty list
Here is the log (some info have been masked) I get after running the ANT-script and precisely just after the java code:
SshClient ssh =new SshClient();
ssh.connect(strHost);
**********
* LOG *
**********
[java] [main] WARN com.sshtools.j2ssh.transport.HostKeyVerification - Not enough permission to load a hosts file, so just creating an empty list
[java] [main] INFO com.sshtools.j2ssh.transport.cipher.SshCipherFacto ry - Loading supported cipher algorithms
[java] [main] INFO com.sshtools.j2ssh.transport.kex.SshKeyExchangeFac tory - Loading key exchange methods
[java] [main] INFO com.sshtools.j2ssh.configuration.ConfigurationLoad er - JAVA version is 1.6.0_11
[java] [main] INFO com.sshtools.j2ssh.configuration.ConfigurationLoad er - Extension /usr/java/jdk1.6.0_11/jre/lib/ext/dnsns.jar being added to classpath
[java] [main] INFO com.sshtools.j2ssh.util.ExtensionClassLoader - Adding /usr/java/jdk1.6.0_11/jre/lib/ext/dnsns.jar to the extension classpath
[java] [main] INFO com.sshtools.j2ssh.configuration.ConfigurationLoad er - Extension /usr/java/jdk1.6.0_11/jre/lib/ext/sunpkcs11.jar being added to classpath
[java] [main] INFO com.sshtools.j2ssh.util.ExtensionClassLoader - Adding /usr/java/jdk1.6.0_11/jre/lib/ext/sunpkcs11.jar to the extension classpath
[java] [main] INFO com.sshtools.j2ssh.configuration.ConfigurationLoad er - Extension /usr/java/jdk1.6.0_11/jre/lib/ext/sunjce_provider.jar being added to classpath
[java] [main] INFO com.sshtools.j2ssh.util.ExtensionClassLoader - Adding /usr/java/jdk1.6.0_11/jre/lib/ext/sunjce_provider.jar to the extension classpath
[java] [main] INFO com.sshtools.j2ssh.configuration.ConfigurationLoad er - Extension /usr/java/jdk1.6.0_11/jre/lib/ext/localedata.jar being added to classpath
[java] [main] INFO com.sshtools.j2ssh.util.ExtensionClassLoader - Adding /usr/java/jdk1.6.0_11/jre/lib/ext/localedata.jar to the extension classpath
[java] [main] INFO com.sshtools.j2ssh.transport.publickey.SshKeyPairF actory - Loading public key algorithms
[java] [main] INFO com.sshtools.j2ssh.transport.compression.SshCompre ssionFactory - Loading compression methods
[java] [main] INFO com.sshtools.j2ssh.transport.hmac.SshHmacFactory - Loading message authentication methods
[java] [main] INFO com.sshtools.j2ssh.transport.TransportProtocolComm on - Starting transport protocol
[java] [Transport protocol 1] INFO com.sshtools.j2ssh.transport.TransportProtocolComm on - Registering transport protocol messages with inputstream
[java] [Transport protocol 1] INFO com.sshtools.j2ssh.transport.TransportProtocolComm on - Negotiating protocol version
[java] [Transport protocol 1] INFO com.sshtools.j2ssh.transport.TransportProtocolComm on - Protocol negotiation complete
[java] [Transport protocol 1] INFO com.sshtools.j2ssh.transport.TransportProtocolComm on - Starting key exchange
[java] [Transport protocol 1] INFO com.sshtools.j2ssh.transport.kex.DhGroup1Sha1 - Starting client side key exchange.
[java] [Transport protocol 1] INFO com.sshtools.j2ssh.transport.HostKeyVerification - Verifying xx.xx.xx.xx host key
[java] The host xx.xxx.xx.xxxx.com,11.111.11.11 is currently unknown to the system
[java] The host key fingerprint is: 9999: 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99
[java] Always option disabled, host file is not writeableLast edited by merc; 01-19-2010 at 11:51 AM.
Similar Threads
-
j2ssh to run multiple commands
By idan hen in forum NetworkingReplies: 4Last Post: 10-18-2009, 08:21 PM -
retain value of input type file in a jsp file while being dynamically generated
By nidhi c in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 09-27-2009, 02:21 AM -
how to read openproj(Projity) file i.e. ,POD file(Project Management file)
By mahendra.athneria in forum New To JavaReplies: 0Last Post: 02-11-2009, 09:53 AM -
How to parse the CSV(Comma separation values)file and validate the file using java
By padmajap13 in forum Advanced JavaReplies: 7Last Post: 05-23-2008, 03:46 AM -
J2ssh 0.2.9
By levent in forum Java SoftwareReplies: 0Last Post: 05-23-2007, 07:46 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks