Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > j2ssh and known_hosts

Reply
Thread Tools

j2ssh and known_hosts

 
 
theoryboy@my-deja.com
Guest
Posts: n/a
 
      08-09-2005
I'm writing a Java application that includes uploading a number of
files using scp. I am using the j2ssh library for this. For the most
part, it works fine but the validation of known hosts seems to be
faulty.

If I ssh to the host in question from a regular shell, it connects
without comment using the key pairs found in $HOME/.ssh. Using j2ssh,
however, I get (amongst the other output)

The host <host name and IP address deleted> is currently unknown to the
system
The host key fingerprint is: 1024: cc d0 4a 39 a7 d7 f1 6b f2 b2 55 a7
f0 8c 54 56
Always option disabled, host file is not writeable

(It reports the hostname and IP address properly in the <> bit)

I've started to look at the source code to look at what might be
causing this, but I was hoping somebody had seen it before and could
help me out.

Any thoughts?

Thanks,

Peter

 
Reply With Quote
 
 
 
 
Chris Head
Guest
Posts: n/a
 
      08-10-2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
[snip]
> The host <host name and IP address deleted> is currently unknown to the
> system
> The host key fingerprint is: 1024: cc d0 4a 39 a7 d7 f1 6b f2 b2 55 a7
> f0 8c 54 56
> Always option disabled, host file is not writeable
>
> (It reports the hostname and IP address properly in the <> bit)
>
> I've started to look at the source code to look at what might be
> causing this, but I was hoping somebody had seen it before and could
> help me out.

[snip]

Hi,
I don't know J2SSH as such, but I suspect it may be the same library
that's used in jEdit's FTP plugin. If this is the case, then the library
maintains its own separate list of known hosts, which is not the same as
your OpenSSH list. This allows it to operate on platforms where OpenSSH
is not installed (Windows, for example, will not have a .ssh directory
anywhere).

I don't know about the "host file not writable" thing; I suspect you may
need to create a directory somewhere which J2SSH wants to write the
hosts file into.

Chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)

iD8DBQFC+aMu6ZGQ8LKA8nwRAswBAJ0b/GO6WWj6qvKuD0B3p88CnuKIxgCgsBR5
U/jsmLA3J2QDgQDoRpV1jco=
=Ur+D
-----END PGP SIGNATURE-----
 
Reply With Quote
 
 
 
 
Peter Saffrey
Guest
Posts: n/a
 
      08-17-2005
Thanks for your reply Chris. In fact, j2ssh was looking for
$HOME/.ssh/known_hosts, but could not understand its format. This was
mentioned in one of the log messages, which I had not examined
carefully enough. I trimmed out some of the more exotic looking entries
in known_hosts and it worked fine.

Cheers,

Peter

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
if and and vs if and,and titi VHDL 4 03-11-2007 05:23 AM
J2SSh Marcelo Java 2 10-05-2005 05:21 PM
using j2ssh connecting via sftp, but get "Corrupt Mac on input" Geir Java 0 12-16-2003 03:32 PM



Advertisments