host key issue via java


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers host key issue via java
# 1  
Old 07-22-2010
host key issue via java

Hi,
I am encountering below mentioned exception when I execute my Java program that is supposed to SFTP the file from one server over to another.

Can you please tell me some pointers to resolve this issue?


Exception
Code:
HostName- 10.1.1.1 ; userName- bmsftp 
log4j:WARN No appenders could be found for logger (com.sshtools.j2ssh.transport.publickey.SshKeyPairFactory). 
log4j:WARN Please initialize the log4j system properly. 
The host 10.1.1.1  is currently unknown to the system 
The host key fingerprint is: 1024: a d3 9d 50 c9 97 6e f3 54 ef 8e ce 26 cd 54 78 
Do you want to allow this host key? [Yes|No|Always]: java.lang.NullPointerException 
        at com.sshtools.j2ssh.transport.ConsoleKnownHostsKeyVerification.getResponse(Unknown Source) 
        at com.sshtools.j2ssh.transport.ConsoleKnownHostsKeyVerification.onUnknownHost(Unknown Source) 
        at com.sshtools.j2ssh.transport.AbstractKnownHostsKeyVerification.validateHost(Unknown Source) 
        at com.sshtools.j2ssh.transport.AbstractKnownHostsKeyVerification.verifyHost(Unknown Source) 
        at com.sshtools.j2ssh.transport.TransportProtocolClient.verifyHostKey(Unknown Source) 
        at com.sshtools.j2ssh.transport.TransportProtocolClient.performKeyExchange(Unknown Source) 
        at com.sshtools.j2ssh.transport.TransportProtocolCommon.beginKeyExchange(Unknown Source) 
        at com.sshtools.j2ssh.transport.TransportProtocolCommon.onMsgKexInit(Unknown Source) 
        at com.sshtools.j2ssh.transport.TransportProtocolCommon.startBinaryPacketProtocol(Unknown Source) 
        at com.sshtools.j2ssh.transport.TransportProtocolCommon.run(Unknown Source) 
        at java.lang.Thread.run(Thread.java:534)

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Change from weak ssh host key to strong one

Hi, I got instructions from Security audit team for Solaris-10 server. They mentioned - "The sshd configuration on the host supported weak host keys and allowed password authentication on Solaris server. Enable stronger keys (2048 or 4096 bit)". I am not clear enough, what they mean by weak... (7 Replies)
Discussion started by: solaris_1977
7 Replies

2. UNIX for Beginners Questions & Answers

Host key verification failed error

HI i am getting host key verification failed error. # cat id_rsa.pub | ssh root@10.110.51.245 'cat >> .ssh/authorized_keys;exit;' cat: id_rsa.pub: No such file or directory @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! ... (3 Replies)
Discussion started by: scriptor
3 Replies

3. HP-UX

SSH2 - signature didn't match with host key

I am trying to complete ssh2 connection between HP-UX and CoreFTP. The host key authentication fails with signature didn't match. See below output. I can connect to this CoreFTP from my Windows desktop, and connect to a multitude of other servers from the HP-UX system as well, but have... (2 Replies)
Discussion started by: Stars
2 Replies

4. Solaris

Ssh between servers - No DSA host key is known

It seems I can do ssh <IP> but not ssh <hostname> If I try to ssh to hostname I get the error - No DSA host key is known for host1 and you have requested strict checking. Host key verification failed. Where do I set up the DSA keys? Is it ssh_known_hosts? Assume afterwards I can... (3 Replies)
Discussion started by: psychocandy
3 Replies

5. Solaris

Solaris 8 ssh public key authentication issue - Server refused our key

Hi, I've used the following way to set ssh public key authentication and it is working fine on Solaris 10, RedHat Linux and SuSE Linux servers without any problem. But I got error 'Server refused our key' on Solaris 8 system. Solaris 8 uses SSH2 too. Why? Please help. Thanks. ... (1 Reply)
Discussion started by: aixlover
1 Replies

6. Shell Programming and Scripting

SCP command end with Host Key not found in database

Hi, I'm trying to copy a file from one server to remote server using SCP command. Below is the command i tried and got host key not found in database errror. scp sendfile.txt Remoteserver:/home/xxxx/. Error Message: Host key not found from database Key fingerprint:... (2 Replies)
Discussion started by: skcvasanth
2 Replies

7. Shell Programming and Scripting

Script to check if host key authentication is setup

Hey all, I have a script that I use for some automated installs. Unfortunately for the script to work the server that it's running from needs to have host-key authentication setup to the target server. If it isn't setup beforehand and the script is executed the install partially completes and... (1 Reply)
Discussion started by: Rike255
1 Replies

8. UNIX for Dummies Questions & Answers

Host key verification failed in openssh

Experts, We are trying to make a key-based authentication from Server A to Server B. Server A is installed with openshh. Server B runs "Sun_SSH_1.1". Server A's rsa2 public key has been added into the server B's authorized_keys. We are sure that permission settings of the files and folders in... (1 Reply)
Discussion started by: rprajendran
1 Replies

9. Shell Programming and Scripting

Host Key verification failed

Hi, I am running a script to scp a file from one server to another. I have created the public/private key and copied the public key to the other server and appended it to authorized_key file. But i am getting the error message saying "Host Key verification failed" Connection lost. It works well... (3 Replies)
Discussion started by: ahamed
3 Replies

10. UNIX for Advanced & Expert Users

RSA host key addition

Guys How do i add RSA key for a host ? I was able to connect to a host some time back but now its not connectable ,via SSH. Message i get is : abhi@myHost:~/.ssh> ssh eatcid@yourHost @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION... (3 Replies)
Discussion started by: ak835
3 Replies
Login or Register to Ask a Question