I have tried put -r directory/*, which only uploaded the files and not folders. Gave me the error, cannot Couldn't canonicalise.
Any help would be greatly appreciated.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here you can find detailed explanation as how to copy a directory using
scp. In your case, it would be something like:This will copy the directory “foo” from the local host to a remote host’s directory “bar”.
Here
-ris -recursively copy entire directories.You can also use
rcpwith similar syntax. The only difference between them is thatscpuses secure shell andrcpuses remote shell.BTW The “Couldn’t canonicalise” error you mentioned appear when sftp server is unable to access the file/directory mentioned in the command.
UPDATE: For users who want to use
putspecifically, please refer to Ben Thielker answer here.