0 votes
1 view
in AWS by (8.9k points)

I use SSH to connect to my Ubuntu instance. With SSH I can administer files and folders on the instance, but how do I upload files and folders from my local machine to the instance?

Is it possible to do right from SSH session, without using SFTP clients?

1 Answer

+1 vote
by (18.5k points)
selected by
 
Best answer

You can use SCP or WinSCP to transfer files or folders to your EC2 instance.

For SCP, you need to  run the following command on your cmd of your local machine:

scp -i path/to/pem path/to/file [email protected]/home/username

For WinSCP, download and install WinSCP tool and follow the below-mentioned steps:

1. Open WinSCP console and provide the required information such as Hostname (value: Public IP of your instance), the user name( value Amazon linux instance is ec2-user and value for ubuntu instance is ubuntu), then click on advanced.

3. A new window will be displayed. Select SSH from the left pane then select Authentication.

4. Browse and select your private key file then click ok then click login. When the dialog box pops up, click yes.

5. Now you just have to select files from the left pane(your local machine), drag and drop files on the right pane (your instance's home directory).

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...