S3 Backup Setup

When setting up backups through S3, it is recommended to have a copy of the ‘secret_key.txt’ file. If my MIAB instance is in a remote EC2 location, what is the best way to copy that down locally? I’ve been trying SCP, but keeps erroring with: scp: Received message too long 1349281121.

Thanks

Hi, it’s just a short text file, about 3k. “scp” should be fine, or you could just “cat” it and copy the contents!

Or just
sudo su
cp -rp to /home
and then ftp to /home
It will let you download it.

So I copied the .txt file to the /home directory and attempted to scp from a local machine, but got the same message too long error.

image

It might be a permission problem.
I see permisions are 600 root root.
So from /home as superuser or with sudo.

chmod -R 755 secret_key.txt

Copy it at your disired location and then, at that location revert to

chmod -R 600 secret_key.txt

You can also SFTP (Filezilla) to your box with the ssh username and password and download it from there while the permissions are 755.

Delete it from /home and from any other unsafe place such as a local machine.

rm -rf secret_key.txt

Don’t forget to change permissions back to 600 as it might be acccessible to the outside.

But as @andrew says from terminal you can just cat, or just sudo nano secret_key.txt, select it with left mouse click and right click to copy and paste it in notepad or something.

Ok, didn’t realize you could just nano it and copy the contents. All squared here…thanks!