• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Connect to a remote host using JSch

 
Ranch Hand
Posts: 70
Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a form which takes user@hostname and password as input. I have written the following code:

It is throwing an exception. May I know what has to be corrected?
 
Saloon Keeper
Posts: 7576
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you going to tell us what exception that was, and in which line of code it happened, or are we supposed to guess?
 
Shikha Upadhyaya
Ranch Hand
Posts: 70
Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Moores wrote:Are you going to tell us what exception that was, and in which line of code it happened, or are we supposed to guess?


Oh sorry. Here's the exception:
 
Tim Moores
Saloon Keeper
Posts: 7576
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So the problem is solved now?
 
Shikha Upadhyaya
Ranch Hand
Posts: 70
Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Moores wrote:So the problem is solved now?


No. It's not solved.
 
Tim Moores
Saloon Keeper
Posts: 7576
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, what do you think the error message is trying to tell you?
 
Shikha Upadhyaya
Ranch Hand
Posts: 70
Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Moores wrote:Well, what do you think the error message is trying to tell you?


I guess it is not able to locate the host. Is it right?
 
Tim Moores
Saloon Keeper
Posts: 7576
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Correct. Is that host name resolvable on the machine where you're running the code? It sure is not on mine.
 
Shikha Upadhyaya
Ranch Hand
Posts: 70
Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Moores wrote:Correct. Is that host name resolvable on the machine where you're running the code? It sure is not on mine.


Yes, the hostname is resolvable. When I tried out this out it is working fine. But when I tried to write something on my own, I is not working out.
 
Shikha Upadhyaya
Ranch Hand
Posts: 70
Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, it is working now. I followed this link. But I am not able to figure out what exactly has been done so that my code is working fine now.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic