Hello,

I am using Jsch version 1.43 for SSH with J2SE 1.6 and I have met the following 
problem. My application has a problem in reading the following format of 
known_hosts file:

188.75.128.9  ssh-rsa 
AAAAB3NzaC1yc2EAAAABIwAAAQEAmfqHByMHTshmvyKaGr0FMXKcLvaK3oEokPAjq/9P/uoJf62QPNrLQ0xJ5MgYmlXrVDuwXZmD6AH4wJI93+MWrtePdY8WG4WTXgMTULxPiRXA5Eg0uIxHTn6gIB0VCTyL29x2Lx5XXhtd1M3LZslGaxW2LRTDC0oE+1h00aJcWgon8LJlcSiHOC4qfPJgEwDm3IFisZ95zNQSjQebqtYfPfYlTico9gp9ItW7XQcoaPPmg9dkJ+M7v3dnFagtsjPtc5UcLRGaxNbJ/cSK/ze3+1EIWb37LyiQpHklweHD/KFUHU3i8tltHmo+w0/4ib+GNHRY1SASB/FRuHjjYqoNqQ==
188.75.176.9 ssh-rsa 
AAAAB3NzaC1yc2EAAAABIwAAAQEAtrPQtXSQy35DtrPv88Bv+5H9ZaDfsJbgS31HFf2uhZAr17mSI5xQABuD5rfpsDKwYIpuPyglQOlb7ZwmRg7w7q//encBaCNGFYwJpIth00N4xEEKF1ES0+6BLYFZXZ2+gvXwmSRWZidMLKLooWWNeYMqaW63VMC76c8GrmsiyKz6Y+Tr+yQy5miyXMvSMwmd7fF/qLW9z9aKf9hZJGy1+062m/isXVk+gePCCgWhY7DEfVRvs4KPNTmlCsJQqbSlDF5om3H+dd6Jt5GdRdOwFHaS/gQjo3wM5cFO+iZm571P9/5J70ZdqnTKnH2UjMP2CTg7HM8sYe6CYJog48rCyw==
188.75.168.9 ssh-rsa 
AAAAB3NzaC1yc2EAAAABIwAAAQEAtrPQtXSQy35DtrPv88Bv+5H9ZaDfsJbgS31HFf2uhZAr17mSI5xQABuD5rfpsDKwYIpuPyglQOlb7ZwmRg7w7q//encBaCNGFYwJpIth00N4xEEKF1ES0+6BLYFZXZ2+gvXwmSRWZidMLKLooWWNeYMqaW63VMC76c8GrmsiyKz6Y+Tr+yQy5miyXMvSMwmd7fF/qLW9z9aKf9hZJGy1+062m/isXVk+gePCCgWhY7DEfVRvs4KPNTmlCsJQqbSlDF5om3H+dd6Jt5GdRdOwFHaS/gQjo3wM5cFO+iZm571P9/5J70ZdqnTKnH2UjMP2CTg7HM8sYe6CYJog48rCyw==
188.75.147.9 ssh-rsa 
AAAAB3NzaC1yc2EAAAABIwAAAQEAtrPQtXSQy35DtrPv88Bv+5H9ZaDfsJbgS31HFf2uhZAr17mSI5xQABuD5rfpsDKwYIpuPyglQOlb7ZwmRg7w7q//encBaCNGFYwJpIth00N4xEEKF1ES0+6BLYFZXZ2+gvXwmSRWZidMLKLooWWNeYMqaW63VMC76c8GrmsiyKz6Y+Tr+yQy5miyXMvSMwmd7fF/qLW9z9aKf9hZJGy1+062m/isXVk+gePCCgWhY7DEfVRvs4KPNTmlCsJQqbSlDF5om3H+dd6Jt5GdRdOwFHaS/gQjo3wM5cFO+iZm571P9/5J70ZdqnTKnH2UjMP2CTg7HM8sYe6CYJog48rCyw==
myHostname, 188.75.28.9 ssh-rsa 
AAAAB3NzaC1yc2EAAAABIwAAAGEApQgb3124kaSghz+LLY+l9h4p81sZL46GzE14zKtcio6WYUJT8w+e4n4PBjAB8aM5ep02Z4JgtYGfjHAEfM0ddohzv8pcxH4KBlqpQ98DOihID00kuEgbLoHHgWThFaaT
 root@ myHostname
hostname2,188.168.132.15 ssh-rsa 
AAAAB3NzaC1yc2EAAAABIwAAAIEA249e3vCIZgFu/xqkOF39d7qNQglo5l4XU0CIEBlhRqvnYulkS4KY2bQni+KSHAZeHzIuQ2T3/CrSv1+tbSMK+Kq/3dzSzDcfsMAu6pDnJNRucySlkm2SiMFEgSDiDkXjawOFDohBKZU0Yx1RwQ+SYYtsSpiruyaH/yak6AG4EZU=


Jsch cannot read the field root@hostname. If these fields are removed, JSch 
works fine and the application can be open.

The problem is met at the following line: private void initSh() throws 
JSchException {
                JSch sh = new JSch();
                System.out.println("initSh() new Jsch");
                System.out.println("known_hosts_file in init_sh() is 
"+known_hosts_file);
                sh.setKnownHosts(known_hosts_file);
more exactly at sh.setKnownHosts(known_hosts_file);


Also a new version of Jsch was taken into account (1.44) but the problem still 
exists.

Could you please confirm or infirm that Jsch has a problem in reading the 
known_hosts file having at the end user@hostaname? If yes, what would you 
suggest: a new version of JSch? How this can be solved? Is this a known problem?

Thank you very much.

Best Regards,
Adriana


------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
JSch-users mailing list
JSch-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to