Originated from
QueryCAT

How do I log on to a remote machine using ssh in ...

How do I log on to a remote machine using ssh in java and do file operations on that remote machine?


Share Send to a friend Watch Report
 
 

2 Posted Answers
Order by

 
207 helpful answers

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. 

Posted 2008-03-28T09:56:49Z
Eran was invited by Yedda to answer this question.

 

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.

Posted 2008-04-11T15:50:03Z

Sign in to participate

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).

Explore Related Questions

Other people asked questions on similar topics, check out the answers they received:


Q:

Explain working of Java Virtual Machine (JVM)

Explain working of Java Virtual Machine (JVM)
Submitted by lovepreet   1 year ago.
  • viewed 304 times
Last answer posted 3 months ago by achievegoal


Explore Related Posts in Forums

HJT log- ChaosArsenal - need help dss hijack log here..

System32\PnkBstrA.exe O23 - Service: Remote Packet Capture Protocol v.0 (experimental) (rpcapd) - CACE \CurrentControlSet\Control\SafeBoot\Minimal\{533C5B84-EC70-11D2-9505-00C04F79DEAF}] @="Volume shadow copy : Remote Packet Capture Protocol v.0 (experimental) (rpcapd) - CACE Technologies - C:\Program Files

HJT Log w/ Combo-Fix Log

ITunesHelper.exe C:\Program Files\Java\jre1.6.0_01\bin\jusched.exe C:\Program Files\HP\HP Software Update :\Program Files\Java\jre1.6.0_01\bin\jucheck.exe C:\Program Files\HP\Digital Imaging\bin\hpqSTE08.exe C \drivers\fssfltr.sys [2008-4-26 43816] R2 LMIRfsDriver;LogMeIn Remote File System Driver;c:\windows

Compiling and Executing Java Remotely

In my company I have many guys who want to learn Java. They don't have the admin rights to install anything. They don't even have the JRE. Is it possible for them to compile and execute their Java from that PC. It shouldn't make a difference whether they're logging in remotely or locally. Java can...
» More...
Powered by
Feed - Subscribe to changes to this Q&A Blog
ADVERTISEMENT
ADVERTISEMENT
AOL Autos Q&A is powered by Yedda an AOL Company
Copyright © 2006-2010, Yedda Inc. and respective copyright owners