Skip to content

Common Tasks & Commands

Scott Madara edited this page Oct 25, 2018 · 6 revisions

SSH Into an EC2 Server

You can SSH into any given EC2 server running Solodev through an SSH client (recommended: Putty). You will need the Key Pair used at the time of the server's installation in order to connect.

  1. Within your AWS account, navigate to the "EC2" dashboard
  2. Click on "Running Instances"
  3. Find the EC2 instances you want to connect to and note its IP address
  4. Using your SSH client, SSH into the server using the following credentials:
    1. Hostname: ec2-user@{{EC2 SERVER IP ADDRESS}}
    2. Password: (leave blank)
    3. SSH Authentication: PEM/PPK for the EC2 Key Pair specified during installation
  5. Once connected, you can assume super admin rights by running "sudo bash"
  6. You can exit bash by typing "exit" and hitting enter

Editing Files on the Server with Vi

You may need to edit certain files on the server, particularly when it comes to initially configuring your server for backup and restore. This includes modifying included files so that they use your unique AWS account related details. You can do this through your shell client using Vi text editor. A simple tutorial can be found below. You can find additional informaiton through a number of external resources such as by Norm Matloff and Ryan Chadwick.

  1. Enter the file by running the following command:
  2. vi FILENAME
    
  3. Enter "insert" mode by running the following command
  4. i
    
  5. Find the lines that you need to edit and make your changes in your prompt:
  6. Once you've made your changes, exit insert mode pressing the "Esc" key
  7. Save your changes by typing the following and pressing enter:
  8. :wq