scp command (Remote to Local )
I am using cent os 5. I successfully copy a file from to my local computer to remote computer
PHP Code:
I have google but still fail to fetch file i.e remote to PC...> To ....> Local PC thanks in advance, garden |
Hi,
Code:
scp 192.168.1.10:/home/file1.txt file1.txt |
thanks for the reply. Sorry I for get to write the IP settings. The IP Settings are
Local PC:- 192.168.1.10 Remote PC:- 192.168.1.20 Thnaks, garden |
Hi,
Try the following command Quote:
|
Hello gardenair
Practise checking the man pages.. "man scp" will give more details about usage. |
thanks all for the reply. Well I have tried the following code.
PHP Code:
I have also checked 1st the man page but there was still confusion. kindly guide me . thanks garden |
try
Code:
scp 192.168.1.20:/home/file1.txt . Probably you mean file1.txt in a users homedirectory, if the users name is gardenair, you may write Code:
scp 192.168.1.20:/home/gardenair/file1.txt . Markus |
@gardenair,
First execute pwd command to know where are you right now, If your pwd is /home/gardenair then execute scp scp 192.168.1.20:/home/gardenair/file1.txt . as markush explained. If you are into some other directory then execute scp 192.168.1.20:/home/gardenair/file1.txt /home/gardenair/ This error "scp: /home not a regular file" is because you are trying to copy directory, If you want to copy directory through scp then you have to provide option -r Hope this helps you. |
I'm trying to do the same thing that gardenair is/was (sad when we never find out if our suggestions help or not). I say:
scp root@139.64.100.1: /usr3/d/HRF I want to move the file HRF from /usr3/d/ on the server whose IP is 139.64.100.1 to my current attch point on the local server. No matter what I try I keep getting the .: not a regular file error message. Any help would be greatly appreciated and I'll let you know if it helps or not! :D -Brad |
Hi,
Quote:
Code:
scp root@139.64.100.1:/usr3/d/HRF HRF Code:
scp root@139.64.100.1:/usr3/d/HRF . Hope this helps. |
Drunna,
Thank you so much. That did the trick! -Brad |
NB: If you do this often and don’t want to write the TCP/IP address all the time, you can create a file ~/.ssh/config which will also bo honored by scp and put therein:
Code:
Host local Code:
scp foobar:/usr3/d/HRF . |
Thanks, Reuti. That makes for a few fewer keystrokes!
Thanks to all for your help. I'm sure I'LL BE BACK! :D |
In general, its
Code:
scp <user>@<machine>:/path/to/file <user>@<machine>:/path/to/file HTH |
Quote:
|
All times are GMT -5. The time now is 02:15 PM. |