In order to copy files from local to a remote system using ssh, there should be an authorized user with a pem file. And also for that particular user in the remote system, there should be proper permissions for the destination.
Remote System
- Login to the remote server using putty or through powershell.
- Navigate to the destination folder
- Change the permissions using the below command
Local System
- Open command prompt
- Use scp command to copy the required files
- Using the above command the files will be copied and the permission are set as if it is a new file.
- If it is required to copy the file along with its history and permissions, then use -p option
Remote system - check file permissions
- Now login to your remote system and check if the files are copied properly or not.
- Some time there will not be proper permissions to the files that are copied. In that case, change the owner and the read/write permissions as per the requirement. This can be done only by the root user
- If you are logged in as different user other than root, logout the user
- Sudo as a root user
- Change the ownership
- Change the permissions
No comments:
Post a Comment