Presumably you are running this in a local MobaXterm shell (i.e. local to the windows machine). If that is the case, you need to update the scp command syntax to accommodate that environment, although the syntax is incorrect regardless.
MobaXterm provides access to local drives in it's shell via the mountpoint /drives/X
, with X being the windows drive letter.
Additionally, the (simplified) general syntax of scp, regardless of environment is:
scp usage:
scp [[user@]host1:]/path[/filename] [[user@]host2:]/path/[filename]
The first sequence ([[user@]host1:]/path[/filename]
) is the 'FROM' section; the source of the file or files to be copied. The second is the 'TO'; the destination. The brackets indicate optional arguments.
It is really just an ssh enabled version of the standard cp command; with the section prior to the :
containing the ssh specific information, and the info afterwards pertaining to the cp operation.
user:
user
defaults to your current, local username - it can be left out if that is the correct user name in both the source and destination.
host:
host
defaults to the local computer (localhost); so if you are copying to / from the local machine AND the username on localhost to be used is the current user, you can omit that argument for the local file(s).
file / path:
path/filename
defaults to the specified users home directory and it can be omitted if that's desired. filename can be left out when doing a recursive copy as in your situation - just provide the path in that case. Generally the full path and filename is specified in the FROM section, and just the path in the TO section (it will default to keeping the same filename).
I'm using remoteuser
and remotePC
as the username and remote PC host name; replace with the correct names.
Correct syntax in your example:
scp -r "/drives/C/Users/Andrea/Documents/Betrivius/candycane-0.9.6/candycane" remoteuser@remotePC:/home6/XXX/public_html
Use the command man scp
or this site for additional details (arguments, other usage info).
GUI Option
Alternatively, MobaXterm provides a graphical file browser (built on sftp or scp based on configuration options) which provides drag and drop bi-directional file transfers when you have connected to the remote host via ssh. Details here.
SSH
(and thus alsoscp
) interpretes a colon as a separator between host and path on the host. Thus you have to escape the colon. On Linux you'd normally do this by prefixing it with a backslash:\:
, but I don't know how this should work on windows. FYI: neither source nor destination contains a remote hostname, this seems something else you need to fix too.scp
on the server. You should runscp
or equivalent tool on your local computer unless your Windows is also SSH server (but even in this case initiating the connection from Windows seems more natural). I advise you to investigate MobaXterm "built in file transfer pane" mentioned here.