Transfer Files¶
Transfer Files to and from a Linux Instance (including attached Volume)¶
Files can be transferred to and from a Linux instance using scp and sftp. Before you do so, make sure the public key is added to the instance and port 22 is open.
File Transfers Using scp (secure remote copy)¶
How to transfer files to and from an instance depends on the local operating system.
scp Between a Local Linux and a Linux Instance¶
To transfer files from a local computer to the instance in the cloud proceed as follows:
Install OpenSSH (if not already installed).
Add your private key to the ssh agent.
Execute the following scp command in your terminal:
scp <source file> <username of instance>@<instance IP>:<destination file>
For <source file> substitute the path pointing to the file to be copied, and for <destination file> substitute the desired target location. The instance IP is the floating IP which is reachable over the internet.
To transfer a file from an instance in the cloud to your local file system proceed as follows:
Execute the following scp command in your terminal:
scp <username of instance>@<instance IP>:<source file> <destination file>
The <destination file> in this case is the file on the local computer.
Note
Scp can also be used to copy files from one instance to another within the cloud.
scp Between a Local Windows Computer and a Linux Instance¶
WinSCP can be used to copy files from a Windows computer to a Linux instance and vice versa. You can run pageant on your local Windows computer and add the private key for easier management when also using PuTTY for SSH connection.
- Start WinSCP and click the New Site button.
- Click on the Advanced button on the right. A new window pops-up.
- Click SSH and then Authentication on the left.
- Activate the checkbox Allow agent forwarding under Authentication parameters.
- Provide the location of the private key in the Private key file field (should be in the .ppk format).
- Click on the OK button to close the Advanced Site Settings windows.
- Choose SCP as the protocol in the File protocol dropdown menu.
- In the Host name field, enter the floating IP Address of the instance the connection should be established to.
- Fill in the user of the instance in the User name field.
- Click on the Save button to save the settings.
- Press the Login button and the connection to the instance via scp will be established. A window will appear with a graphical user interface allowing the transfer of files between the local computer and the instance.
Note
In case the connection fails, please make sure Pageant is running and contains the private .ppk key.
Manage Files in the Object Storage¶
This section is for Windows only! For Linux we recommend to use the CLI Client (SWIFT).
It is possible to manage Object Storage using a SWIFT/S3 browser. We are using Cyberduck in our example. Others may work as well.
- Login to the Cloudlynx Dashboard.
- Under the Menu Manage Compute, click on Access & Security.
- Open the API Access tab.
- Click on the button Download EC2 Credentials.
- Download the zip file and open it.
- Start Cyberduck.
- Click on Open Connection.
- Choose S3 (Amazon Simple Storage Service) from the drop down menu.
- Fil in the Server field: api.preview.cloudlynx.ch
- Open the downloaded zip file from the Dashboard, open the ec2rc file in notepad or another text reader.
- Find the EC2_ACCESS_KEY information and copy it to the field Access Key ID in Cyberduck.
- Find the EC2_SECRET_KEY information and copy it to the Secret Access Key in Cyberduck.
- Click on the Connect button.
- A message may appear that the key needs to be added to your local key store.