Keywords: LAMP/MAMP/WAMP - AWS - How to - Connectivity (SSH/FTP)
I want to copy files directly between an old Lightsail instance and a new one rather than download to my local machine and upload again. Both instances are using the same Lightsail default key pair. I have not been able to figure out how to specify the key file correctly in the SCP command.
I want to copy files from the remote instance (old) to the instance (new) of my SSH session. Please let me know the correct way to perform an example copy operation like the following.
scp -i LightsailDefaultKey.pem bitnami@[remote lightsail instance IP address]:/home/bitnami/remote-file-to-copy.txt /home/bitnami
I’ve tried numerous variations. All have been rejected with permission denied. Thanks for your help!