• 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

SFTP server on Windows 7

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello friends,

I need to connect to remote machine (windows 7) using java code...for that I need SFTP server ..but i dont know which SFTP server to use in this case..
Can anybody tell me which server to install on remote machine so that i can connec to that machine using java code
 
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OpenSSH is pretty much the standard SSH server and it includes an SFTP server. Some instructions for installing it on Windows http://www.worldgoneweb.com/2011/installing-openssh-on-windows-7/ .
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

vishal gaikwad wrote:hello friends...


Vishal,

Please don't post multiple threads on the same subject. I've locked your other one.

Thanks.

Winston
 
vishal gaikwad
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK Winston
 
vishal gaikwad
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi richard,

thank you for your fast reply

but still I am not able to connect to SFTP server through my java program..what to do...?
 
Richard Tookey
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

vishal gaikwad wrote:
but still I am not able to connect to SFTP server through my java program..what to do...?



If you expect help we need to know what Java SFTP client package you are using, what code you are using and what the symptoms are! Without this we are just guessing. Have you made sure that you can connect using a non-java client?
 
Marshal
Posts: 79177
377
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving discussion as too difficult for its present location.
 
vishal gaikwad
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Richard ..I am using OPensshd as my SFTP server...
while connecting I am getting following error..
I think its regarding password...can you pleas tell me how to change password of any user


---------------------------------------OUTPUT I AM GETTING AFTER RUNNING MY PROGRAM----------------------------------------------------------

****USAGE WARNING****

This is a private computer system. This computer system, including all
related equipment, networks, and network devices (specifically including
Internet access) are provided only for authorized use. This computer system
may be monitored for all lawful purposes, including to ensure that its use
is authorized, for management of the system, to facilitate protection against
unauthorized access, and to verify security procedures, survivability, and
operational security. Monitoring includes active attacks by authorized entities
to test or verify the security of this system. During monitoring, information
may be examined, recorded, copied and used for authorized purposes. All
information, including personal information, placed or sent over this system
may be monitored.

Use of this computer system, authorized or unauthorized, constitutes consent
to monitoring of this system. Unauthorized use may subject you to criminal
prosecution. Evidence of unauthorized use collected during monitoring may be
used for administrative, criminal, or other adverse action. Use of this system
constitutes consent to monitoring for these purposes.



Exception is---com.jcraft.jsch.JSchException: Auth fail
 
Campbell Ritchie
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

vishal gaikwad wrote:. . .
I think its regarding password...can you pleas tell me how to change password of any user
. . .

Maybe you should rephrase that
 
Richard Tookey
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

vishal gaikwad wrote:
I think its regarding password...can you pleas tell me how to change password of any user



Did you read the reference I provided? It tells you exactly how to set passwords!

You haven't indicated whether or not you can connect to the server using a non-java client such a Putty. You have not said which Java client library you are using though from the error message I can guess that it is JSch from JCraft. You have not posted the code you are using. All these are important to anyone trying to help you since without this information we are just guessing.
 
vishal gaikwad
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am able to connect through telnet in putty but not able to connect through ssh in putty

Following is my java code
I am calling it from other java Class


 
Richard Tookey
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

vishal gaikwad wrote:I am able to connect through telnet in putty but not able to connect through ssh in putty.



1) Go through the reference again making sure you are following all the steps. Until you can prove the SSH process is running and have setup passwords nothing will work. Also, when you are looking for help you need to say more than " but not able to connect through ssh in putty" - you need to say what the symptom are.
2) Don't try to integrate your Java code into your main application until you can prove it works. The best way to do that is to create a simple SSCCS that you can experiment with but there is no point in doing this until you can contact the computer using Putty.
3) The fact that you can use Telnet should represent a security concern. The whole point of using SSH and SFTP is to provide secure communication between your two computer but Telnet if just not secure and the Telnet server should be removed.

Sitting in front of my computer I can't help further until you can prove the SSH server is running and that you can connect to it via Putty.
 
vishal gaikwad
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello Richard,
still I am not able to collect how to set password..can you please elaborate it in details..
I am not able to understand the steps that are given in YOUR LINK
 
Richard Tookey
Bartender
Posts: 1166
17
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

vishal gaikwad wrote:hello Richard,
still I am not able to collect how to set password..can you please elaborate it in details..
I am not able to understand the steps that are given in YOUR LINK



I have a real problem providing any help here. I have just followed the instruction given in the reference and was able to setup two users and passwords on an Windows 7 running on Virtual Box. Now I could just post copies of the documentation but what would be the point? I could rewrite the documentation but what would be the point when the existing documentation works? I could paraphrase the documentation but I would not be adding anything to the documentation so what would be the point?

On this side of the Internet I can't see what you are doing wrong so you have to go though the documentation over and over again until you get it right.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic