wodSFTP using SCP? (General questions)
Can I use the wodSFTP component to do SCP?
Can I use the wodSFTP component to do SCP?
by wodDamir , (6596 days ago) @ bgilbertBMI
Hi,
Unfortunately that's not possible with wodSFTP.
However, wodSSH could implement SCP. You can download the free trial of wodSSH from our site, and try out the sample Implementing SCP which is included into the component.
Hope I helped.
Regards,
Damba
by Jasmine, (6596 days ago) @ wodDamir
I must also ask - are you sure you need SCP? If you use any newer SSH server, then SFTP is also supported. SFTP is much better than SCP and in 99.99 cases it is provided - so my suggestion would be to try wodSFTP, perhaps it works for you too.
Regards,
Kreso
by bgilbertBMI , (6596 days ago) @ Jasmine
We have been transfering successfully during testing using SFTP but there is now a problem with the destination server. After a consistent amount of files have transfered the server stops responding. It has been reported that SCP works better so that has prompted my question.
by bgilbertBMI , (6571 days ago) @ bgilbertBMI
I have downloaded and installed wodSSH. How do I upload files? Do I use the Execute and run a command similar to scp testFile.xml user@192.168.0.2: , or do I use the send or sendEof methods?
by wodDamir , (6571 days ago) @ bgilbertBMI
Hi,
Yes, in case of using scp you need to send an appropriate command to the server. You can use any of those two methods. The difference is that Execute requires Blocking mode to function, and that is also my suggestion.
You should also use WaitFor Method prior to Execute, since WaitFor will cause wodSSH to wait until the appropriate pattern has been received.
Regards,
Damba
by bgilbertBMI , (6570 days ago) @ wodDamir
I am having trouble getting the waitfor command to work, I am in blocking mode.
Do you have a code example of the Send or SendEOF
Does it matter that this app is multi-threaded in Delphi?
Thanks.
Brad
by wodDamir , (6570 days ago) @ bgilbertBMI
Hi,
Could you provide us more information about the issue?
What exactly happens? Do you get an error?
Could you prepare a sample for us which we could run on our side in order to duplicate the issue?
Regards,
Damba
by BGILBERTBMI , (6570 days ago) @ wodDamir
Below is my connect:
SSH.Prompt := 'regex[$ #>] $';
SSH.Connect;
This is the results that get printed from OnStateChange:
Stated Changed Connecting to server (from Disconnected from server)
Stated Changed Connected to server - idle (from Connecting to server)
Stated Changed Receiving data from server (from Connected to server - idle)
Stated Changed Connected to server - idle (from Receiving data from server)
This is the code to do my upload:
//turn on blocking
SSH.Blocking := true;
SSH.WaitFor('regex[$ #>] $');
SSH.Execute('scp /local user@host:/remotpath');
The command waitfor never responds, I don't receive an error. Also what is interesting is that the OnPromptReceived event does not fire. This may be related.
I don't have sample code the would work well in your environment I hope this helps though. Thanks for the help.
Brad
by wodDamir , (6570 days ago) @ BGILBERTBMI
Hi Brad,
Did you try out our sample which comes with wodSSH ( Implementing SCP )? Did that work?
Also, Blocking needs to be set before calling Connect Method.
If the OnPromptReceived Event isn't triggered, probably the component really didn't receive the expected prompt?
If you connect using Putty what prompt do you receive?
Regards,
Damba
by bgilbertBMI , (6570 days ago) @ wodDamir
I did see a reference on your forum to an example of using SCP with SSH however I did not find it. I will look again as soon as I return to the office, or is there a link to an online help reference?
I did connect through putty and the prompt received was user@hostname ~ . I did not disclose the actual user and host but the format is exactly the same.
Thank you again for the quick responses.
Brad
by wodDamir , (6569 days ago) @ bgilbertBMI
Brad,
You should try modifying the Prompt Property to match the one you received in Putty, or adding ~ to your regex expression. Can you try that?
Also, the sample i mentioned is under VB folder located in the installtion path you specified when you installed the component.
Regards,
Damba
by bgilbertBMI , (6563 days ago) @ wodDamir
Yes I did and it helped thank you. I didn't notice there were different examples in the component folder as opposed to the activeX folder.
However the sample only shows how to transfer one file. I want to transfer many files within a directory and I can only get scp to work if I set the command prior to connect using the file name I am transferring. Do I have to then re-connect each time I send a file?
by woddrazen , (6563 days ago) @ bgilbertBMI
Hi Brad,
You can try to send scp -f filename or scp -t filename with Send Method just after connection is established with server.
That way you don't need to use Command Property and wodSSH will not automatically disconnect when execution of command is finished.
You should also remove Disconnect Method from a sample code.
Hope this helps.
Regards,
Drazen
...with WOD's excellent support I was able to bypass Winsock and focus on the task at hand...
You have been great as far as offering support is concerned and has been extremely responsive to both support requests and suggestions for product enhancements.
Thank you very much for the rapid responses. I was a little nervous about dealing with a company that is on a different continent from me. You have proven my concerns to be unfounded.
We have recently completed a large 1200+ location project where reliable Telnet and SSH connectivity was required. wodSSH worked flawlessly and allowed our staff to complete our project ontime and within budget.
Many thanks for your excellent support service. I can see why you have a long list of excellent testimonials on your website.
Thank you for the great customer service ... I am really impressed with the wodSSH ActiveX control.
Thank you very much for the rapid responses. I was a little nervous about dealing with a company that is on a different continent from me. You have proven my concerns to be unfounded.
Not only wodSFTPdll is excellent, the service you have provided is outstanding and second to none!
Thank you very much for the rapid responses. I was a little nervous about dealing with a company that is on a different continent from me. You have proven my concerns to be unfounded.
May I say how nice it is to work with components so complete and self-explanatory that using them in my application is as instinctive as though I wrote them myself?