0

Let me redo this, I was accessing a sever via ssh, i can access the server easily from my system (the server is in my local network). I tried copying a file from my local system to my server and it failed due to an error (permission denied). And now I do not want to dig whats wrong and instead want to get that file(which is on my system) from my server directly to which I am ssh'd into.

Old questions: /* I am using scp as a root, tried all the things but unable to copy files from my system to the remote server (to which I am logged-in via ssh from the same system). Let say i want to get the files from my system while being on ssh'd server, how do i do it.*

Imrank
  • 51
  • 1
    The solution is posted here: link – Russo Aug 21 '17 at 11:29
  • Could you please add a little more detail? What exactly did you do, what did you want to achieve and what happened instead? Did you encounter any warning or error messages? Please reproduce them in their entirety in your question. You can select, copy and paste terminal content and most dialogue messages in Ubuntu. (see How do I ask a good question?) – David Foerster Aug 22 '17 at 11:18
  • well, I was trying to send a file using SCP, and was rejected due to "permission Denied" issue. Just now got to know that the SCP was deliberately disabled on the server from preventing any security issues. – Imrank Aug 23 '17 at 12:55
  • and my question still remains, what-if it was disabled (or preveted) to send any file to the server, was there any other way around like to get the required file from my desktop into to the server. – Imrank Aug 23 '17 at 12:57

1 Answers1

0

To copy from local to server, Open up a normal Terminal window (Not the one in which you are already logged in to ssh) and run something like

scp /path/to/file/to/be/copied username@ipaddress:/path/where/you/want/to/paste

If copying a folder, use

scp -r /path/to/file/to/be/copied username@ipaddress:/path/where/you/want/to/paste

The username and ipaddress are that of the server. Even then if you get any errors, then paste it here.

kashish
  • 1,332