scp from one remote server to another remote server
If you are trying to transfer files from one remote server to another remote server using scp and you are getting permission denied error, here is the solution for you.
Suppose you are using system A and you want to transfer files from system B to system C and you are trying
You should use
Example :If you are trying to transfer files from one remote server to another remote server using scp and you are getting permission denied error, here is the solution for you.
Suppose you are using system A and you want to transfer files from system B to system C and you are trying
scp user1@systemB-IP:/location/sourcefile user2@systemC-IP:/location/targetFile
But you are getting permission denied errorYou should use
ssh user1@systemB-IP scp /location/sourceFile user2@systemC-IP:/location/targetFile
But still you are getting permission denied error, tryssh -t user1@systemB-IP scp /location/sourceFile user2@systemC-IP:/location/targetFile
IP of system A - 192.168.0.11
IP of system B - 192.168.0.12
IP of system C - 192.168.0.13
Source file location on system B - /opt/lampp/htdocs/install.log
Destination location on system C - /opt/logs
You are log in to system A and you want to transfer file from system B to system C. Run following command :
ssh -t root@192.168.0.12 scp /opt/lampp/htdocs/install.log root@192.168.0.13:/opt/logs
Solution : 2
Save public key file of your system (system A) into system B and system C.
scp $HOME/.ssh/filename.pub root@192.168.0.12:/root/.ssh/authorized_keys scp $HOME/.ssh/filename.pub root@192.168.0.13:/root/.ssh/authorized_keysand now run
scp root@192.168.0.12:/opt/lampp/htdocs/install.log root@192.168.0.13:/opt/logs
No comments:
Post a Comment