How do I log on to a remote machine using ssh in java and do file operations on that remote machine?
They're coming to take me away, Ha-haaa!
Advanced .NET Debugging Blog
My personal blog
There is a Java library called SSH Tools which is an implementation of the SSH protocol in Java. You can get it here.
I haven't used it and I don't know for sure that you can use it to copy files, but I am sure you can connect to other machines.
Try it out.
There is also another option which is to invoke the SSH and SCP (secure copy) from Java and take control of the standard output so that you can able to capture both the send and receive parts.
The search for people who can answer your question continues for as long as needed - until you find the answer you were looking for.
When an answer is posted by someone who was invited (byYedda or by yourself) to answer your question, their answer is marked with a yellow "invited by Yedda".
To be invited to answer other people's questions in your areas of knowledge and interest, be sure to list your favorite topics:
» My Settings My Topics.
Of course, the more helpful your answers are, the more likely you are to be invited to future questions...
Thanks for your reply.But I was able to connect to the remote machine using ssh but I am unable to do multiple operations. I was able to do single operation only.What I want is to connect to the remote machine and copy files to a location, move them and delete them from previous location.
Got an answer for shobs? Would you like to comment on the posted answers, or vote for the one which you think is the best?
Sign up for a free account, or sign in (if you're already a member).
Other people asked questions on similar topics, check out the answers they received:
Other people asked questions on various topics, and are still waiting for answer. Would be great if you can take a sec and answer them