Interesting, is there any catch in doing that or does it work in most use cases?
rsync code remote:/
I believe that results in remote:/code/app.js rsync code/ remote:/
I believe that results in remote:/app.js rsync /some/where/local/ host:/another/place/remote/
The contents of local/ go into remote/OTOH there where issues with scp having a fixed tcp window size of 4k (not sure if this is still the case) which would slow down copies on networks with some latency.
sftp have none of these issues. i prefer sftp for most tasks.
The CPU use might be slightly higher. I don't think it's a problem anymore.