~/.sshdirectory on Unix machines by convention. More on SSH in a later section.
~/.sshfolder in your Unix filesystem. If this folder doesn't exist, create it with
mkdir. This is the standard place to store SSH keys. For WSL users, see a past student Porter's notes here.
~/.sshon our Unix machines (use Ubuntu if on Windows). For WSL users, see a past student Porter's notes on this here.
<KEYFILE_NAME>in the following commands with the name of our downloaded keyfile.
-iparameter specifies the keyfile to use.
[email protected]specifies we wish to login to the server as the
ubuntuuser, the default user for Ubuntu machines. Replace
<KEYFILE_NAME>with our downloaded keyfile name, and
<EC2_PUBLIC_IP>with our EC2 instance's public IP.
cdif you need to.
cdinto the cloned directory
sudogives us root user permissions that we need to execute Node in this context.
exitor use the
Ctrl+Dkeyboard shortcut to log out of SSH. Note that once we log out, our server will stop running.
pscommand to get a list of all processes.
-ameans "all", and
-xwill give us more detailed information the command for each process.
psoutput. Copy the PID and use it to run
kill, which will kill the relevant process. We will want to use
killbecause we had to use
sudoto start the server process.