sftp -P 2222 localhost
> cp file.md .
> Server does not support copy-data extension
sftp itself doesn't have support for cp within the protocol. What you want is to cp over using sshfs. You do that by doing
sshfs -p 2222 localhost:/project /tmp/test, where /tmp/test is an empty directory that exists. Then you can cp files into /tmp/test. You could also mount the root / instead of /project. Which would allow you to see projects and create a new one with mkdir.
sftp itself doesn't have support for
cp
within the protocol. What you want is to cp over using sshfs. You do that by doingsshfs -p 2222 localhost:/project /tmp/test
, where/tmp/test
is an empty directory that exists. Then you can cp files into /tmp/test. You could also mount the root/
instead of/project
. Which would allow you to see projects and create a new one withmkdir
.