sudo copy issue
Hi,
I have sudo access in a remote server, i need to get the files files from the remote server using the scp or rsync .. please tell me how to do it. ps: i cannot copy from the remote server like sudo cp as it has been blocked. i can copy the files only using get method like below scp username@remoteserver:/var/log/xxx.file /tmplocalserver can any one point me the correct method ?? |
Quote:
Login to the remote machine and copy it to the destination: Let's say you have to copy the file from host A to host B: The command you should be using this on the host which is having the file(i.e A here).. Quote:
|
Hello Sai,
I think I read your question and get confused with cp and scp. Make me correct if I am wrong somewhere * you can not run cp command in server because of sudo restriction * you can only do scp to remote machine from your system So I am pointing the below method on scp command only. For eg. Remote File name = remotetest.txt Local File name - localtest.txt Remote Machine Name = ServerA Your machine name = laptop Now you are here only using your laptop .And will do scp only from your laptop , not from inside of the server Method (1) ;Login in your laptop (I hope it is linux machine) to scp a file from your laptop to remote server scp localtest.txt username@serverA:/path/in/server eg. scp localtest.txt user1@ServerA:/opt/ Method (2) Second method you already typed. That was getting file from remote server to your laptop scp user1@ServerA:/path/remotetest.txt ~/Desktop |
All times are GMT -5. The time now is 01:05 AM. |