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 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,342