AWS: Remote Machine Login and File Transfer

Jaspersoft BI for Amazon Web Services requires very little systems management. Despite its greatly reduced need for administrative intervention, on occasion you may need to connect to the server's file system to retrieve log files, upload licenses, edit configuration files, or run commands from a console interface.

There are a variety of utilities you can use to accomplish these tasks. This article demonstrates file transfer using a third-party utility for Microsoft Windows called WinSCP. Command line interactions are shown using the AWS console "Connect from your browser" feature. These two utilities were chosen because they are the easy to explain and use for their use cases. You may be familiar with and prefer other methods, such as PuTTY, ssh command line utilities, and so on.

File Transfer

This section demonstrates an easy way to move files back and forth between the Linux server running JasperReports Server on AWS and your local computer. (Note: The client computer for this example runs Microsoft Windows.)

File transfer use cases include:

  • Uploading a Jaspersoft license file from your local computer to JasperReports Server
  • Downloading log files for troubleshooting
  • Uploading database drivers, custom data source files, and so on

Requirements

  • The public IP address or hostname of the AWS server instance running JasperReports Server
  • The Public key name associated with the server instance
  • The path to the Private key file that works with the Public key mentioned above
  • A file transfer utility such as WinSCP
    • Important: If using WinSCP, the Private key file must be converted to the .ppk file format. Use the Puttygen "import key" utility to convert from .pem to .ppk file formats. See Dealing with Private Keys in Other Formats  for more information.
  • Login username: ec2-user

Steps to Transfer Files

  1. Run the WinSCP application from the Windows Start menu.
  2. Click New. Use the following values:
    1. Host Name (or IP address)
    2. Port number: 22
    3. User name: ec2-user
    4. Password: leave blank
  3. Private key file: navigate to the Private key file
  4. Protocol: SFTP
  5. Click Save. The default session name will follow the standard user@host, e.g., ec2-user@bdsandbox7. You can change it if you want. Click OK.
  6. Click Login to connect. 
  7. Your local file system appears in the left panel and the remote AWS computer appears in the right. You can now easily copy files back and forth between systems. 

WinSCP Extras

Editing Files with WinSCP

You can double-click and edit text files directly from the WinSCP interface. A copy of the file will be downloaded and opened in a text editor. When you save the file, it will be copied back to the server.

Command Line Interactions with WinSCP

WinSCP includes a Commands menu. From it you can click Open Terminal, which allows you to run a single command at a time, or Open in PuTTY, which opens a full command line console if you have PuTTY installed. 

Command Line Interactions

The AWS console provides a command line utility that runs in a Java-enabled Web browser window. It is documented on the AWS web site.

Command line interactions use cases include:

  • Starting, stopping, restarting or checking the status of JasperReports Server
  • Running any Linux command

Requirements

  • Access to the AWS Console
  • The path to the Private key file that works with the Public key used by your server instance

Steps to Open a Command Line Window from the AWS Console

  1. Login to the AWS console, e.g.: https://<yourOrganization>.signin.aws.amazon.com/console 
  2. From the AWS Console Home page, click EC2
  3. Click Instances from the side bar or Running Instances from the top level summary
  4. Locate your instance and right-click it
  5. From the Instance Management pop-up menu, click Connect
  6. The Public DNS and Private Key name will be entered for you. Complete the following:
    1. User name: ec2-user
    2. Private key path: enter the path to the Private key file that works with the Public Key named on-screen.
  7. Click Launch SSH Client
  8. When prompted to run the application named com.mindbright.application.MindTerm, click Run
  9. If prompted to add the server's fingerprint to the cache, click Yes
  10. You can now run any Linux command

For More Information

Feedback