Changes

Jump to: navigation, search

Tutorial 1: Using Your Matrix Server Account

617 bytes added, 13:38, 13 May 2022
INVESTIGATION 2: USING THE LINUX SHELL
:* Learn how to access your '''Matrix''' server account (from a '''remote''' home and/or from Seneca computerlab).
:* Learn several ways to '''exit''' your Matrix Linux Account session.
|- valign="top" style="padding-left:15px;"
|colspan="2" |'''Slides:'''<ul><li>'''Week 1 Lecture 1 Notes:<br>''' [[Mediahttps://github.com/ULI101/slides/raw/main/ULI101-Week11.1.pdf | PDF]] | [https://matrixgithub.senecacollege.cacom/ULI101/slides/~chris.johnsonraw/ULI101main/ULI101-Week11.1.pptx PPTX]<br/li><li>'''Week 1 Lecture 2 Notes:<br>''' [[Mediahttps://github.com/ULI101/slides/raw/main/ULI101-Week11.2.pdf | PDF]] | [https://matrixgithub.senecacollege.cacom/~jason.carmanULI101/slides/raw/main/ULI101-Week11.2.pptx PPTX] <br>'''</li></ul>'''Tutorials:'''<ul><li>[https://wiki.cdot.senecacollege.ca/wiki/Tutorial_1:_Using_Your_Matrix_Server_Account#INVESTIGATION_1:_ACCESSING_YOUR_MATRIX_LINUX_ACCOUNT HOWTO: Access Your Matrix Account]</li><li>[http://czegel.com/seneca/uli101/lectures/Lecture1.html Les Czegel's Week 1 Notes (HTML)]</li></ul>'''Windows SSH client Software:'''<ul><li>[http://www.sfsu.edu/ftp/win/ssh/SSHSecureShellClient-3.2.9.exe SSH/SFTP]</li><li>[https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html Putty]</li><li>[https://www.bitvise.com/ssh-client-download Bitvise SSH Client]</li><li>[https://mobaxterm.mobatek.net/download-home-edition.html MovaXterm]</li></ul>
| style="padding-left:15px;" |'''Matrix Account Access:'''
*[https://ss64.com/bash/logout.html logout , exit]<br>
*[https://www.quora.com/What-is-the-difference-between-typing-Ctrl+C-and-Ctrl+D-in-the-Linux-terminal &lt;ctrl&gt;&lt;d&gt;]
*[http://man7.org/linux/man-pages/man1/passwd.1.html passwd]<br>
'''Command Line Editing:'''
*[https://www.ostechnix.com/list-useful-bash-keyboard-shortcuts/ Bash Shell Shortcut Keys]<br>
| style="padding-left:15px;"|'''General Linux Commands:'''
*[http://man7.org/linux/man-pages/man1/pwd.1.html pwd]<br>
*[http://man7.org/linux/man-pages/man1/cd.1p.html cd]<br>
|colspan="1" style="padding-left:15px;" width="30%"|'''Brauer Instructional Videos:'''<ul><li>[https://www.youtube.com/watch?v=L5RcOngDV_o Connecting to Matrix Using SSH Client, and Running UBUNTU Within Windows 10]<br><br></li><li>[https://www.youtube.com/watch?v=3wZmZOKLllk&list=PLU1b1f-2Oe90TuYfifnWulINjMv_Wr16N&index=2 Linux File System, Basic Navigation (ls, cd, pwd, tree), Absolute and Relative Paths]</li></ul>
|}
===Connecting to Your Matrix Account===
There are two basic methods to connecting to your Matrix account: [[Image:clicls-promptshell.png|thumb|right|80px100px|Connect to Matrix via'''ssh''' command]]:'''Method 1: Run ssh Command from command prompt:''' :After connecting to the '''Seneca Student VPN''', you can open a '''command terminal'''<br>in your '''Newer Windows 10''', '''Mac''' or '''Linux''' computer and issue the following command:<br><br><span style="color:blue;font-weight:bold;">ssh senecauserid@matrix.senecacollege.ca</span><br><br>[[Image:ssh-applicationmain-iconwindow.png|thumb|right|80px100px|Connect to Matrix via '''graphical''' SSH Program ]]:'''Method 2: Run graphical ssh program via MyApps in Seneca computer lab:''':If you are in a Seneca computer lab, you can use MyApps to run a '''graphical SSH application''' for your Windows machine. One advantage of using this method is that you are already at Seneca and are NOT required to connect to the student VPN.<br><br>'''NOTE:''' You instructor may show you how to run a graphic Linux VM in order to connect to your Matrix account (if interested, refer to the optional tutorial at the end of this semester).
<br><br><br>
===METHOD 1: CONNECTING TO YOUR MATRIX ACCOUNT FROM YOUR HOME COMPUTER===
[[Image:gp1.png|thumb|right|130px|The '''Seneca Student VPN''' service must be connected.]]
You will now learn a quick and simple method of connecting to your Matrix account by opening<br>a text-based '''terminal''' (in any OS) and issuing the '''ssh command'''.<br><br>
'''Perform the Following Steps:'''# Before proceedingIf you want to connect to your Matrix account from home, make you MUST first connect to the Seneca Student VPN.<br>Make certain that your '''Seneca Student VPN is connected'''.<br><br>'''NOTE:''' If you haven't set this up, refer to the following link for instructions;<br>https://students.senecacollege.ca/spaces/186/it-services/wiki/view/1025/student-vpn<br><br>'''NOTE:''' You only have to connect to your Seneca student VPN once during the day,<br>or while you are logged into your computer.<br><br>
# Determine which '''operating system''' that your computer is using.<br><br>
# Try connecting to your Matrix account using the instructions in the '''table''' below based on <u>your</u> '''current operating system'''.<br><br>
'''NOTE:''' You should notice that the you are disconnected and that the original terminal window has '''automatically closed'''.<br><br></li><li>Try accessing your Matrix account, and then exiting your Matrix account several times to become familiar with this process.<br><br>You will now learn an '''alternative method''' to access your Matrix account (if you have an MS Windows machine)<br>by downloading and running a graphical SSH application.</li></ol><br>
===METHOD 2: CONNECTING TO YOUR MATRIX ACCOUNT FROM SENECA COMPUTER LAB===
 ===CONNECTING TO YOUR MATRIX ACCOUNT FROM SENECA COMPUTER LAB==<span style="color:red;font-weight:bold;">NOTE: This section requires you have access to a Seneca computer lab on campus.<br>If you don't have access to a Seneca computer lab this semester, then you can skip this section</span><br><br>
You can also connect to your Matrix server account in the '''Seneca Computer lab via MyApps'''.<br><br>
One advantage of this method is that your are at the college; therefore, '''you do NOT have to worry about connecting to the Seneca VPN'''. Another advantage of using this method is to introduce you to a '''graphical program''' to allow you connect to your Matrix account as opposed to using the '''ssh''' command (shown in the previous section).<br><br>
===Part 2: Access your Matrix Account from a Seneca College Lab ===
[[Image:apps-anywhere-main-window.png|thumb|right|250px|'''MyApps''' ('''AppsAnywhere''') Main Window ]]
You will learn how to connect to your Matrix Linux account from a workstation in your computer labs at Seneca college. This method would also be useful if you do '''not ''' have a home (notebook ) computer and are required have access to use one of the workstations available in your a Seneca computer labworkstation.<br><br>
'''MyApps''' ('''AppsAnywhere''') is an application streaming service that lets you install software on any Seneca PC on demand. Any software application on the MyApps menu can be used on computers in classrooms, labs, and the Computing Commons.
You will now use '''MyApps ''' on your Windows workstation in your Seneca lab room to launch an application<br>to allow you to connect and login to your Matrix server account.
[[Image:apps-anywhere.png|thumb|right|250px|Several SSH applications will appear. We will use the application called '''SSH Client''' for this practice tutorial. ]]
# Start your workstation in your lab and login to your Seneca Windows account.<br><br>
# Make certain that the '''MyApps''' window is open. This window should have opened shortly after you logged into your Windows workstation. If the application windows is not open, click on the '''MyApps''' icon on the desktop to launch).<br><br>[[Image:ssh-main-window.png|thumb|right|150px|SSH Client Application Window ]]<span style="color:red;font-weight:bold;">NOTE: You may be required to validate in order to use MyApps correctly. If you see near the top of the screen "requires validation", then click on that area to connect to validate.</span><br><br>
# Click on the '''Search Apps''' area located in the top right corner of the MyApps window and type the word: <span style="color:blue;font-weight:bold">ssh</span><br><br>
# Several SSH applications will appear. <br><br>'''NOTE:''' All of these applications allow you to connect to your Matrix account.<br>We will use the application called '''SSH Secure Shell Client''' for this practice tutorial.<br><br>
# Next, a dialog box will appear prompting you for your Matrix account password in order to gain entry to your Matrix account. Your Matrix password is identical to your Seneca password. As you type the password, the text will be blocked-out or hidden to prevent others from viewing the screen to obtain your password[[Image:ssh-authentication-response.png|thumb|right|150px|Authentication Response Dialog Box ]]<br><br>
# Enter your password and click '''OK''' or press '''ENTER'''<br><br>[[Image:ssh-login-error.png|thumb|right|150px|SSH Login Error ]]
# Click '''OK''' or press '''ENTER''' at the '''Authentication Response''' dialog box.<br><br>'''NOTE:''' If you encounter an '''error message''', this can occur for several reasons:<ol><li>You mis-spelled the '''name of the server'''</li><li>You mis-spelled your Matrix '''username''' (same username that you connect to my.senecacollege.ca)</li><li>You have '''CAPS LOCK''' on by mistake (your username should be '''lowercase''' only).</li><li>You mis-spelled your '''password''' (same password that you connect to my.senecacollege.ca)</li></ol><br>If you encountered an error logging in, issue the same steps to connect to your Matrix account,<br>but carefully check your server name, username and your password. If you continue to experience the same problems,click on the following link for IT service desk contact info: <br>you can go to the computer help [https://students.senecacollege.ca/spaces/190/support/wiki/view/1473/contact-its '''IT service desk in the learning commons to get help'''].<br><br>[[Image:ssh-shell-window.png|thumb|right|150px|Matrix Shell Command Line Interface ]]#If you entered your password correctly, the main SSH Linux shell should appear where you enter Linux commands.<br><br>The '''Matrix''' server has been configured to allow users to '''only interact with the Linux OS by issuing commands'''. There are various reasons for this, but the main 2 reasons are to '''force students to learn how to issue Linux commands''' as well as '''limitations to remote access to a graphical Linux server''' due to large number of users (students).<br><br>Later in the course, your instructor may demonstrate other ways of accessing '''graphical versions of Linux''', and how to launch a shell terminal.<br><br>[[Image:ssh-settings-window.png|thumb|right|150px|SSH Settings Dialog Box ]]
You can '''configure''' the SSH application to adjust elements such as the '''window size''' and '''text font type''' and text '''font size'''. We will be showing you how to configure your SSH Secure Shell Client, but the other applications can allow you to configure their settings.<br><br>
# It is recommended to repeat these steps with connecting to your Matrix account from a Seneca lab workstation until you become comfortable with the process.<br><br>
In the next sectioninvestigation, you will learn how to connect issue Linux commands from the command prompt (referred to as the "shell"), learn how to get help with Linux commands, use command-line editing short cut keys, and run a program to confirm that you connected to your Matrix server account from a different computer<br>(in order to get marks for example: your laptop computer at Seneca College or your computer at home)this online tutorial.<br><br>
=INVESTIGATION 2: USING THE LINUX SHELL =
# Navigate through the man utility for the '''ls''' Linux command and note the '''option letters''' that correspond to the following descriptions:<br><ul><li>"'''use a long lising format'''"</li><li>"'''do not ignore entries starting with .'''" (i.e. hidden files)</li><li>"'''sort by file size'''"</li><li>"'''append indicator (one of */=>&|) to entries'''" (i.e. type of file)</li></ul><br>
# Exit the man utility for the ''ls'' command.<br><br>
# Issue the '''ls''' command for <u>each</u> of those option letters you noted in '''step 45''' to see how this command differs for each option.<br><br>'''NOTE:''' The '''man''' utility can be used with the '''-k''' option to help list Linux commands that match a text pattern<br>that is contained within the help screen for a Linux command.<br><br>
# '''Pipeline commands''' can be used to filter-out unnecessary output. In the next command that you will be issuing,<br>the output from the '''man -k''' command, is sent into the '''grep''' command to ''filter'' (i.e. ''trap'') only output that matches the pattern "8"<br>(The number "8" refers to the category of type of command - in this case, administration commands).<br><br>We will learn more about pipeline commands later in this course.<br><br>
# Issue the following Linux pipeline command: <span style="font-family:courier;color:blue;font-weight:bold">man -k user | grep 8</span><br><br>How does this ''pipeline command'' make it easier to obtain information regarding man command?<br><br>
# If you wish to change your password, you can change it by issuing the command: <span style="font-family:courier;color:blue;font-weight:bold">passwd</span><br>What option for the passwd command can be used to change user info (such as name)?<br>'''Hint:''' use the '''man''' command for '''passwd'''.<br><br># Press the letter <span style="font-family:courier;color:blue;font-weight:bold">q</span> to exit the man command.<br><br>'''NOTE:''' Do '''NOT''' run the ''passwd'' command. Unique for this college, your Matrix password<br>is changed automatically when you change your '''myseneca''' password.<br><br><br># Press the letter <span style="font-family:courier;color:blue;font-weight:bold">q</span> to exit the man command.<br><br>You will now learn how to perform '''command line editing'''<br>to correct syntax errors while typing Linux commands PRIOR to pressing the ENTER key.<br><br>
'''Command Line Editing'''
'''Running a Shell Script to Check Student Online Tutorial Participation'''
Some professors Professors will require students successfully perform these online tutorials for marks (within a deadline). <br>In order to confirm that you successfully performed a tutorial, you will be required to run a program<br>(or in later tutorials, several programs) to prove that you successfully completed tasks in a tutorialand get marks.
These programs (known as Shell Scripts) will check your work and offer feedback if you made mistakes, so you can make corrections.<br>Making corrections (i.e. troubleshooting) and re-running these checking programs until you are successful will help students<br>gain "hands-on" experience as well as "trouble-shooting experience.
 
Students whose professors do NOT assign marks for these online tutorials are encouraged to perform them for "hands-on" practice. The checking program for this tutorial is just showing proof that you were able to connect to your Matrix account from your home computer.
simulate a quiz:
https://ictgithub.senecacollege.cacom/ULI101/labs/~murray.saulraw/uli101main/uli101_week1_practice.docx
Your instructor may take-up these questions during class. It is up to the student to attend classes in order to obtain the answers to the following questions. Your instructor will NOT provide these answers in any other form (eg. e-mail, etc).

Navigation menu