Загрузка страницы

AWS Tutorial - How to Copy Files From Your Local Computer to EC2 Instance Using The SCP Command

How to host a WordPress website on AWS: https://www.udemy.com/course/how-to-build-a-wordpress-website-on-aws/?referralCode=AFEA59BEE571B7B2E957

AWS Tutorial - How to Copy Files From Your Local Computer to EC2 Instance Using The SCP Command

After you launch your instance, you can connect to it and use it the same way that you'd use a computer sitting in front of you. The following aws tutorial explain how to copy files between local computer and ec2 instance (AWS). You can copy your files using the 'SCP command' from your local machine, and transferring files to your AWS instance can be possible from your command prompt. To copy files between local computer and ec2 instance, follow these steps:

In AWS management console:
Creat security group
Creat keypair (.pem)
Launch EC2 instance. Attach keypair and security group
convert keypair .pem to .ppk
SSH into your ec2 instance and run the following commands
sudo su
yum update -y
yum install httpd -y
cd /var/www/html
chown ec2-user .

On your computer:
Copy the keypair (.pem format) to the folder where the files(that you want to transfer) are present.
Open the command prompt
Change directory to the location of your folder
Run the following command for copying the file to copy only the contents of local_dir and not the directory local_dir itself:
scp -i ./key-pair.pem ./path/to/files/ username@public-ip:/pathwhere/you/need/to/copy

For example:
scp -i ./Ec2KeyPair.pem -r ./Velocity/* ec2-user@107.21.140.196:/var/www/html
To copy a single file from local directory:
scp -i ./Ec2KeyPair.pem ./scp.txt ec2-user@107.21.140.196:/var/www/html

Copy directory local_dir with all its sub-directories:
scp -i ./Ec2KeyPair.pem -r ./Velocity ec2-user@107.21.140.196:/var/www/html

Copy only the contents of local_dir and not the directory local_dir itself:
scp -i ./Ec2KeyPair.pem -r ./Velocity/* ec2-user@107.21.140.196:/var/www/html

AWS Tutorial - How to Copy Files From Your Local Computer to EC2 Instance Using The SCP Command

#AWS #VPC #AWSTutorialForBeginners

Видео AWS Tutorial - How to Copy Files From Your Local Computer to EC2 Instance Using The SCP Command канала AOS Notes
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
27 апреля 2020 г. 23:44:11
00:20:32
Яндекс.Метрика