Hi, I just finished implementing SCP support on the client side (I used SSHD code to start with). I am still in the process of documenting, and don't know if a codebase that is changing a lot would suit you; but you can have a look at [1] and [2]. Recursive copy should work. Also welcome any suggestion on the API.
Shikhar [1] http://code.google.com/p/commons-net-ssh/source/browse/src/main/java/examples/ssh/SCPUpload.java [2] http://code.google.com/p/commons-net-ssh/source/browse/src/main/java/examples/ssh/SCPDownload.java On Sat, Aug 8, 2009 at 6:55 PM, Frank van der Kleij<[email protected]> wrote: > > The SshClient is not scp enabled then? > > I am now trying with putty's pscp and it works better. I found a small glitch > for which I will submit a patch on JIRA. I still have a problem with > recursive copy on a folder;u > > The Window class says: 'Waiting for 16384 bytes on server remote window' and > blocks... > > >> Date: Sat, 8 Aug 2009 18:27:21 +0200 >> Subject: Re: [sshd] does scp works? >> From: [email protected] >> To: [email protected] >> >> I only tried with the basic scp command from my mac. There may be >> compatibilities problems and it has not been extensively tested. >> >> On Sat, Aug 8, 2009 at 16:18, Frank van der Kleij<[email protected]> wrote: >> > >> > I am trying to write my own implementation of the ScpCommand using Apache >> > VFS FileObject io File, but I have several issues. Is anyone using the >> > ScpCommand? >> > >> > I copied the original and just patched it where needed so the problems I >> > have are likely to exist in the normal ScpCommand too. >> > >> > I am probably doing something wrong but I noticed the following: >> > 1. The last element of the command array is a newline character, but the >> > ScpCommand treats it as being the filepath. The sshd SshClient explicitly >> > puts a newline, the ScpCommandFactory splits at normal whitespace only. I >> > fixed it by looking at the element just before the last. Is it part of the >> > protocol? >> > 2. The server hangs on readAck(). I know nothing of the protocol; is this >> > a server problem or should the client send an ack? >> > >> > Which scp clients are compatible? I am using the SshClient of the sshd >> > project. I tried WinScp but it wants to open a bash shell and does not >> > seem to use pure scp... >> > >> > Thanks >> > >> > >> > _________________________________________________________________ >> > See all the ways you can stay connected to friends and family >> > http://www.microsoft.com/windows/windowslive/default.aspx >> >> >> >> -- >> Cheers, >> Guillaume Nodet >> ------------------------ >> Blog: http://gnodet.blogspot.com/ >> ------------------------ >> Open Source SOA >> http://fusesource.com > > _________________________________________________________________ > See all the ways you can stay connected to friends and family > http://www.microsoft.com/windows/windowslive/default.aspx
