If my file something.txt is on a local client and I am ssh'd into a remote server, can I not:

cat /path/on/local/client/something.txt >> /path/on/server

I was able to do what I wanted via:

cat something.txt | ssh username@server "cat > /path/on/server"

But that was outside of server on client. Would like to have remained in server. Is scp required first to get the file onto the server?

  • "can I not..." -- No, you cannot. You need a NFS mount to do something like that, instead of a remote login.
    – sawdust
    Sep 15 '17 at 0:09
  • Yes SCP is required to transfer the file as you have already seen. That is the "file transfer" portion of SSH. Sep 15 '17 at 0:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.