Forums Register Login

Ssh or sftp sever

+Pie Number of slices to send: Send
Hey .. could anyone please help me about how to make sftp or ssh server .... I want to use jsch or sftp library and its written everywhere that it connects to sssh/sftp sever... but not getting anything about how to make the server part.... ???
+Pie Number of slices to send: Send
Why do you want to do this? There are SSH servers for all known platforms, nearly all open source and free.

Most of the time, there is no real sftp server, its just a normal FTP server that you access using SSH.

ssh is a service that uses strong crypto. It is not easy to write code that properly uses strong crypto. It is, in fact, easy to write code that poorly uses strong crypto and is full of holes that are worse than using no security -- because they provide the appearance and feel of security without actually providing anything.
+Pie Number of slices to send: Send
I just want to transfer file from one system to another using jsch or sftp library.. i dont understand do i need to make server side coding for this because its given everywhere that it connects to ssh or sftp server.. ?? or just i have to do client side only.. i am making chat project using socket programming..the chat is going fine.. but i want to transfer files also... any idea.. correct me if am going in wrong direction.. ??
+Pie Number of slices to send: Send
I think you are going in a wrong direction, but I can't be sure, as I'm not sure I am understanding what you want to do.

Start out transfering the data you want using the shell ssh/sftp programs, or if you have to use Windows, use putty.
Get that to work. Get all the proper servers working.

Then, if you really want to do it with a java library, you can easily test your code against the working shell programs.

I'm not familiar with "jsch or sftp library". Is there such a thing? What does the documentation say you need to do?
+Pie Number of slices to send: Send
i just wanted to transfer files from one system to another ... want to add data transferring feature in my chat application(socket programming) any idea how to do this.. ??
+Pie Number of slices to send: Send
That is two requirements.

I suggest you approach them separately. Divide and conquer.

First, make sure you can transfer files. Note: most folks use 'scp' to transfer files rather than sftp.

Second: if your requirement is to have your chat program transfer files, don't start worrying about details of how you do it. You may be able to just use System.exec() to run the scp
command.
+Pie Number of slices to send: Send
i need to use jsch library for that or something else.... ??
+Pie Number of slices to send: Send
 

Shalu Barman wrote:i need to use jsch library for that or something else.... ??



again, I don't understand your question. Have you done the first step that I suggested? It needs no library and no java
+Pie Number of slices to send: Send
You don't have to program anything on the server side. As Pat has been trying to tell you, if you can transfer the files to the intended servers manually by using utilities like scp or sftp, then you have everything you need on the servers. Just write your client code to transfer the files.
Of course, I found a very beautiful couch. Definitely. And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1466 times.
Similar Threads
Remote File integrity
SFTP in unix shell script
OutOfMemoryError in SFTP
ssh example in java.
retriving file from unix server
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 07:20:51.