Sunday, April 28, 2024
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 14849  / 3 Years ago, tue, may 4, 2021, 12:34:28

I am trying to copy a .tar archive from remote server to my pc.



Directory of the archive that I want to copy:



canserhan@embserv:~/tar_files/rtl_archive.tar


Destination:



serhan@serhan-Lenovo-B560:~/Documents$ 


I connect to remote server and use the command:



canserhan@embserv:~/tar_files$ scp canserhan@embserv:~/tar_files/rtl_archive.tar serhan@serhan-Lenovo-B560:~Documents$
Password:
ssh: serhan-Lenovo-B560: Name or service not known
lost connection
canserhan@embserv:~/tar_files$


There must be something wrong with the scp syntax I am using. However I could not figure it out. Could you please help me?



Thanks.


More From » command-line

 Answers
7

As a rule if you wanna send something to the remote server via scp:



scp some_files.tar user@remoteHost:
scp some_files.tar user@remoteHost:Documents/newname.tar


But if you wanna download something:



scp user@remoteHost:Documents/foo.tar ~/Desktop
scp user@remoteHost:/any/other/dir/foo.tar .

[#38415] Wednesday, May 5, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
antoccasiona

Total Points: 430
Total Questions: 127
Total Answers: 131

Location: Netherlands
Member since Sat, Jun 26, 2021
3 Years ago
;