Transferring files from local to FTP using WinSCP

To connect to your Lightsail server using WinSCP (a GUI for transferring files), follow these steps:

1. Ensure You Have the Necessary Information

  • Public IP Address of your Lightsail instance (you can find this in your Lightsail console).
  • Public key file that you downloaded from Lightsail.
  • Default SSH username for Lightsail is typically bitnami (for Bitnami WordPress instances) or ubuntu (for Ubuntu instances).


Download the default key for the instance

2. Convert the Key to the Correct Format (if needed)

  • Lightsail provides an SSH key in .pem format, but WinSCP requires .ppk format. You can use PuTTYgen to convert the key from .pem to .ppk.

Here’s how to do that:

  1. Open PuTTYgen (this is installed with PuTTY, or you can download it separately).
  2. Click Load.
  3. Set the file type to "All Files" to see your .pem file, and select the key you downloaded from Lightsail.
  4. Click Save private key to save the key in .ppk format.

Generate Private Key from Public Key

3. Connect to Lightsail with WinSCP

  1. Open WinSCP.
  2. In the Login window, under File Protocol, select SCP.
  3. Enter your Lightsail instance’s public IP address in the Host name field.
  4. Set Port number to 22.
  5. Set the User name to bitnami (or ubuntu if you’re using an Ubuntu instance).
  6. Click on Advanced > Authentication > Private key file and select the .ppk file you saved after converting your .pem key.
  7. Click OK and then Login.


Navigate to advance for adding the Private Key

4. Transfer Files

Once you are connected, you can drag and drop files between your local machine and your Lightsail server. You will see your local files on the left and your server files on the right.

Summary

  1. Convert the .pem key to .ppk using PuTTYgen.
  2. Connect using WinSCP by entering the server IP, username (bitnami), and the private key.
  3. Transfer files between your local machine and the server.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了