[LINUX] Extract files from EC2 storage with the scp command
Described as a memorandum
Run pwd on the server, check the directory or file you want to copy, and copy and paste
$ pwd
> /home/ubuntu/directory/to/folder
Go back to local and run scp with ssh connection
$ pwd
>Check the directory you want to paste, this time copy and paste to the desktop
> /Users/username/desktop
$ scp -i ~/.ssh/filename.pem -r [email protected]:/home/ubuntu/directory/to/folder /Users/username/desktop
Note that if you write the local directory and the part under ubuntu @ in reverse, the local folder will be uploaded to the server! !! !! !!