I have 3 machines in my local network. These are
Machine1 : 192.168.1.1 (root user: user1)
Machine2 : 192.168.1.2 (root user: user2)
Machine3 : 192.168.1.3 (root user: user3)
I am working on Machine1. Other machines (2 and 3) my remote machines. I reach my remote machines using ssh command from Machine1. I have not any direct access to Machine2 and Machine3 other than network-ssh connection.
I want to copy some files that are located on /usr/local/lib path in Machine2 to /usr/local/lib path of machine 3.
For this purpose from my main machine Machine1 when I used the command:
scp [email protected]:/usr/local/lib/my_file [email protected]:/usr/local/lib/my_file
I get the error :
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).
After encountering this error I used another method. From my main machine Machine1, I connect Machine2 with ssh connection. From ssh connected Machine2 I used the command:
scp /usr/local/lib/my_file [email protected]:/usr/local/lib/my_file
I get the error:
scp: /usr/local/lib/my_file: Permission denied
From ssh connected Machine3 I used the command:
scp [email protected]:/usr/local/lib/my_file /usr/local/lib/my_file
I get the same error:
scp: /usr/local/lib/my_file: Permission denied
I have tried 3 different method to copy some file in /usr/local/lib path. However I couldn't achieve copy.
How can I copy files, which are located in /usr directory, between 2 remote machines?
sshaccess to each other. That is why you are gettingPermission denied (publickey,password). You'll need to enablesshaccess between Machine2 and Machine3 and make sure that the user with whom you are connecting has write access to/usr/local/libon both machines.