We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

SSH to Our Server

You may start to understand why people sometimes throw up their hands and use an "easier" provider like Vercel or Heroku. Those providers configure all the same things we've done so far, then sell it to you at a (steep) markup.

But if you can handle the basics on your own (and you can), you'll save money and have more control over your infrastructure.

Seriously, some folks are happy to chew through C code full of malloc, calloc, and int *int_list_ptr = (int *)struct_list_of_ints;, but adding a route is too hard? Not you; onward and upward.

Here's a review of the networking flow for us to SSH into our server:

  1. Our computer communicates with the server's public Elastic IP address.
  2. The server is in a public subnet with a route to the internet gateway.
  3. The security group allows inbound traffic on 22/tcp from our public IP address.
  4. Our SSH private key matches the public key we uploaded to AWS.

Assignment

Cost check: No new resources in this lesson. You're using the EC2 instance and Elastic IP you already have; cost remains ~$7.60/mo for the instance plus ~$3.60/mo for the EIP.

SSH into patientping-web and update its message of the day.

  1. nc -zv YOUR.INSTANCE.IP.ADDR 22
    # Connection to YOUR.INSTANCE.IP.ADDR port 22 [tcp/ssh] succeeded!
    
    • Host patientping
          HostName IP_ADDR
          User ec2-user
          IdentityFile ~/.ssh/patientping-key
      
  2. echo 'Welcome, PatientPing Server Admin!' | sudo tee /etc/motd > /dev/null
    
  3. exit
    ssh patientping
    

Run and submit the CLI tests.