aspose file tools*
The moose likes Java in General and the fly likes SFTP server on Windows 7 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "SFTP server on Windows 7" Watch "SFTP server on Windows 7" New topic
Author

SFTP server on Windows 7

vishal gaikwad
Greenhorn

Joined: Oct 01, 2011
Posts: 11
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
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 1084
    
  10

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/ .
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 8207
    
  23

vishal gaikwad wrote:hello friends...

Vishal,

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

Thanks.

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
vishal gaikwad
Greenhorn

Joined: Oct 01, 2011
Posts: 11
OK Winston
vishal gaikwad
Greenhorn

Joined: Oct 01, 2011
Posts: 11
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
Ranch Hand

Joined: Aug 27, 2012
Posts: 1084
    
  10

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?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39828
    
  28
Moving discussion as too difficult for its present location.
vishal gaikwad
Greenhorn

Joined: Oct 01, 2011
Posts: 11
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
Sheriff

Joined: Oct 13, 2005
Posts: 39828
    
  28
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
Ranch Hand

Joined: Aug 27, 2012
Posts: 1084
    
  10

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

Joined: Oct 01, 2011
Posts: 11
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
Ranch Hand

Joined: Aug 27, 2012
Posts: 1084
    
  10

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

Joined: Oct 01, 2011
Posts: 11
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
Ranch Hand

Joined: Aug 27, 2012
Posts: 1084
    
  10

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.
 
 
subject: SFTP server on Windows 7