Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

retriving file from unix server

 
sujeet mishra
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I need to develop an application which searches some contents say a particular in the file placed at a location in unix server and displays it on my local machine(in windows).

I need to know how we can connect to the unix server.

Right now I use filezila to connect to the server and download the file.

Inputs for file zila is host name is like sftp://.... , username, pwd and port: 22

Please guide me how to do the same through java code. I work on diff app. dont know java much.

It will be great if I can get any sample code which can guide me further.

Thanks,
Sujeet
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If SFTP (which is FTP over an SSH connection) is the only option to access the server, then you'll need a library that implements it. Read this to get started: http://nileshbansal.blogspot.com/2007/07/accessing-files-over-sftp-in-java.html
 
Campbell Ritchie
Sheriff
Pie
Posts: 48952
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to JavaRanch
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic