HW 4 – Setup a linux server

Moodle Link

Reference:
  1. Go to https://portal.aws.amazon.com
  2. Sign up with google account (Kenyon)
  3. Verify phone number
  4. Set up your account: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/get-set-up-for-amazon-ec2.html
    Make sure to create a Ubuntu 22.04 server.
  5. (You must set up a key pair to secure your connections to your server.)
  6. Create a linux server: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html
  7. Hit the connect button to log in from the web browser.
  8. Create a SSH on you own laptop: Mac:
    1. Open a new Terminal window.
    2. Type:
      ssh-keygen -b 4096 -t rsa
    3. You will be prompted to enter a filename. By default, your keys will be saved as id_rsa and id_rsa.pub. …
    4. When prompted, enter a passphrase.
    5. This will created a hidden directory called . ssh that contains both your public (id_rsa..pub) and private (id_rsa.) key files. 
  9. Create a SSH key on you own laptop: Windows: Link
  10. Copy your public key and mine to your new server:
    1. On you laptop “cat ~/.ssh/id_rsa.pub”
    2. Copy the entire publin key contents.
    3. Log into your Linux VM on the web page
    4. “cd ~/.ssh”
    5. “nano authorized_keys”
    6. Go to the end of the file and paste in the public key.
    7. Go to the end of the file and paste in my public key:
      ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCznmJwSnYjH1lRz7ezF8qG5NK4IgyYTZ3AoXl2pnITxBciacLshTphU2/79DrkyPQxM750ZfXN6Jjr53ozw7ahEzIi/ndcLkRompq+pDzHtYKkeLsldOMPAY45WxS4WGiDdojqzwn0b9hvcMKTJjo3KArxXakoBY7MqARIkKQ+Syzjn+rLnf3szMBh2gJEb8FcRaKCy+ezCgKmuqlyTunV/oxZs91h6taNXE9CSdJAIZs+dLKy8NFUFlKKmfV6s59s8TOXvVC8zfJIkTg+sC2EEb5FVffG4djL0X1eyrMoGtKrUNDWvP1OjK+JzfYnMalPA3tvjKDJRGUNb9Kwd44EiCaEBb67BxiXWxjtDXWHLl2cHd4ApFgIkU84cAc7sgx4GIKeIisbMoFfECnD1TOhpnBt9XE9S4dnsBlTxyb/R2v8NtEZy9Q5s+WzQIdYuiNu5+OTPEiitllmEDHhfvIv212vS43kX8/3J8JafmvdK8D55RDY7XZn7X8+szq2AQts/nMiUdwDxzEL6pps3IKC/BJeL5wz4mnTII73ZrBi9OZjIfSPpigPcKm8PELD36KGaHK+JmUxwOBb5LZKLUFRpA6yOCVXpj1IxgY6FKp+TaAkLBUP+lm5dEIGKTehcKiFw/smM7KtCfw3Y9Dms59GIb2dwPhrKImLZfRfm7HDVw== skonjp@k120716
    8. To exit nano – type “Control-o, return”, Control-x”
  11. Log directly into your linux server from a terminal window on your laptop:
    1. Get the ip address from the EC2 console on AWS
    2. “ssh ubuntu@ip.address
    3. You can now control your system from this window.
  12. Get a remote editor working
    1. MacOS – use BBEdit. BBEdit – File->Open from FTP/STP server. (remote editing)
    2. Windows – Notepad++ (Remote Edit)
  13. Add your AWS servers pulic ssh key to github (just like you did for your laptop)
  14. Turn in the IP address of your new server.
Scroll to Top