Edit: Are you positive you are entering in a valid path in the scp command? For example:
scp test.txt username@remoteserver.com
will fail (in fact, it will just print out the command like you are seeing). In this case, you will need to provide a valid path to the remote server.. e.g., scp test.txt username@remoteserver.com:~/
Example usages:
Send a file:
scp /path/to/local/file yourremoteusername@servername.com:/path/to/remote/directory
Get a file:
scp yourremoteusername@servername.com:/path/to/remote/file /path/to/local/directory
Examples:
Send a file from my Desktop to my home folder on a remote server:
scp ~/Desktop/myfile.txt john_doe@10.1.1.10:~/
Remember the ~
is a shortcut for your home directory... e.g., /home/
Send a file to the the webroot:
scp ~/Documents/working/index.html john_doe@johndoe.com:/var/www/index.html
In this example, the user john_doe would need write privileges on the remote /var/www directory.
You might try
scp
to a different location on the server, then acp
ormv
afterssh
– Jesse W. Collins – 2019-05-29T19:36:05.940Provide more information such as the operating system, ssh config file, etc. – qroberts – 2012-02-29T16:11:09.160
And what are these three lines that are printed? – jjlin – 2012-02-29T17:05:18.673
In the normal case, when you run
scp file server:
(assuming "server" is a valid hostname), the file is copied to your account directory. – dan_linder – 2012-03-01T19:53:44.7733Can you provide the output when you run "scp -v file server:". – dan_linder – 2012-03-01T19:54:24.867