• 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

SSH Public Key Authentication

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was asked to integrate SSH public key authentication to my code (to avoid using passwords when logging into a server). I have searched the web but I'm not sure if I have the terms wrong - I'm not finding any examples. Does anyone know where I can look or can someone recommend a book?

Thanks.
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Dawn,
For SSH public key authentication you can use JSCH API. Refer to this site where you can get the jar file as well as good examples.

Hope this help
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What kind of communication are you trying to enable? SSH is used to open a terminal connection to a remote machine (like Telnet, only more secure). As such, it's rarely used in an application - you'd use the SSH client from the command line. Sometimes it's used to enable secure FTP transfers, though (and then it's called SFTP). So ... what exactly does this code do?
 
Dawn Thomas
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply.

I need the code for 2 things:
1. to FTP a file from one location to another and
2. to login to the server and verify that a file exists in a specific location.

We do this right now using a username and password but these change quite often and it would be easier to use a token or key to login instead of a password.

I'll peruse the link you sent and see if it meets my needs.
reply
    Bookmark Topic Watch Topic
  • New Topic