1
I'm currently logged onto my remote server and I need to transfer a file from my local machine to my remote server using SCP but it doesn't seem to be working. I was able to do it using SFTP but I don't know why I am having such a difficult time with using SCP.
[awong10@hills ~]$ scp -r ~/sugar.txt awong10@147.144.12.15:.
this is the command I entered but apparently it's wrong. am I missing something?
1OK. so I would need to open a new terminal and use the scp command from my local machine home directory, correct? I've been using the scp command on my remote machine directory which I ssh'd into. – ahsw – 2017-09-04T06:39:12.733
Yes, right. Open a new terminal on your local machine and use scp command to copy files on remote. – nagendra547 – 2017-09-04T06:42:02.257
You don't have to be on your local machine, if you can connect to it from your remote server. Just use scp like this:
– jnL – 2017-09-04T06:50:36.287scp user@localbox:/file/source ~/destination
to copy/file/source
from remote server (your local box) to your "local" server, where you ssh'd into. Also see: https://unix.stackexchange.com/questions/188285/how-to-copy-a-file-from-a-remote-server-to-a-local-machineThat's another option. But copying files- login to remote and then copy file from local to remote is not a good way. You need to install and setup ssh server on your local machine also and why you would do that, if remote machine is already having ssh running! – nagendra547 – 2017-09-04T08:18:28.830