Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi;
I installed Solarwinds Toolset on my Windows 10 PC and wanted to copy files and folders to and from my Centos 8 test PC between them. While copying files to and from the SCP server worked fine, I didn't managed to copy directories with -r option:
scp -r cisco@10.100.1.10:/TDocs/ Downloads/
scp: Failed to open file /TDocs/
I have a folder named TDocs in the c:/SFTP_Root folder on my windows PC which is the root folder for SCP/SFTP and there are many files inside it. As seen, TDocs is actually a folder and I did copied individual files via SCP without any issue. I checked the permission of the Solarwinds SCP software on my PC; It had all of the create/read/write/delete permissions enabled.
I am also unfamiliar with Solarwinds SFTP server. It looks more like a server problem then a client problem since the syntax appears correct when connecting to a linux sftp server. Maybe using a wild card will work.
Code:
scp -r cisco@10.100.1.10:/TDocs/* Downloads/
Although I have played with filezilla sftp server on Windows I prefer it being the client then the server. There are GUI tools i.e WinSCP and filezilla and PuTTy has windows command line tools for sftp and scp that are very similar to the linux commands.
Ditto. This problem will be solved by running OpenSSH-server on the CentOS box and using the legacy system only as the client. PuTTY and WinSCP are two good examples that will work then.
Thanks for the replies. I'm learning basic Linux so I wanted only to know why command didn't work. If the syntax was right, then I think the SCP software might have something needed to be checked or fixed.
scp and sftp are different programs and use unrelated protocols. scp is inspired by long defunct rcp and it does more less what rcp did but with encryption bolted on. In other words it is brittle and not clearly defined. It requires working (maybe identical) copies of scp itself on both ends of the connection. So if you're into testing, try putting OpenSSH-server on the CentOS machine going the other direction using the Solarwinds scp utility to connect it.
In contrast to scp, the SFTP client uses a much newer and well-defined protocol instead, and should be more independent from implementation. So you might try with the SFTP client instead. There is a batch mode for the SFTP client.
If the syntax was right, then I think the SCP software might have something needed to be checked or fixed.
A quick search did not find much information/documentation other then a few basic configuration items and starting the server. There might be more documentation provided with the actual program but I am not going to download it. Other then asking Solarwinds since it appears to be a server problem there is nothing that can be fixed on the linux side.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.