Now that we know some basic Linux commands that let us navigate around the file system and move and create files, we can now learn how to connect to remote systems so we can work on them as well.
For this we'll use SSH or the Secure Shell command to create and encrypted tunnel into the host machine. Our host machine will be the Raspberry Pi Server we setup for class.
Remember, when using SSH to connect to another server/computer we are creating a "secure shell" so our communications are safe over the internet, like this:
Open a terminal window.
Use SSH to connect to the web server at school: (Remember to change the IP address to whatever your server is using!)
ssh pi@100.11.81.217
Type "y" and press "return" the first time you connect if it asks you about keys. These are the encryption keys from the image above!
password is "openup"
Find out where you are "standing", what directory you are in on the server:
pwd
List the files in your directory, including their attributes:
ls -la
Try creating a file:
touch mr_cool.txt
I have students always include their name in the filename so you can more easy group and track their progress.
Now create a directory:
mkdir mr_cool
Move the file we created into the new directory:
mv mr_cool.txt mr_cool
List the directory to make sure it's there:
ls -la mr_cool
Change directory to the new directory:
cd mr_cool
Create a new file:
touch mr_cool_1.txt
Change the file name:
mv mr_cool_1.txt mr_cool_new.txt
If we are finished, disconnect from the remote server:
exit