Cannot copy directories by SCP on CentOs 8
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 don't know how your Windows SSH server works, but I would try removing the leading slash in /TDocs. Or the trailing one.
|
Quote:
Code:
[tay@tcentos ~]$ scp -r cisco@10.100.1.10:TDocs/ Downloads/ |
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/ |
I agree with michaelk...rather than try to run ssh on the Windows 10 box, just use WinSCP to transfer files to and from the Linux box...
|
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. |
Quote:
|
All times are GMT -5. The time now is 12:59 PM. |