Lab 5 (Mini Project)

 LAB 5 : MINI PROJECT OPERATING SYSTEM 




Part 1


First let`s make sure the connection is really down by pinging a known externel address. I use Road Runner as my ISP, so for me the command would be ping www.something.com

Something like this should appear.



Press Ctrl + C stop the output. If the command line says timed out or says something about no host or bad route, the connection is indeed down.




Part 2


Not counting email, two most common ways to copy files to another machine are FTP (File Transfer Protocol) and SCP( Secure Copy) .

FTP has been around for many years and is still used quite a lot today. However, standard FTP does have a serious drawback. The data is sent in what is called "clear text". This means a knowledgeable person could obtain the data under the right conditions. We will talk about this a bit later.


Here is how to use the ftp command:


In a terminal session on client, run the following command ftp 192.168.1.103 ( use your own ip address)

 


 It should present you with a prompt. Type in the username and password then press Enter.





It should show something like login successful. If it does not, then you are not logged in although there will still be an FTP prompt.


Assuming it logged in run the following command : ls -la





Run help to show a list of commands. They might not all be available on your system (which consider as a bug).





One thing to remember when using ftp is to know where you are at all times. It is very to get confused. Use pwd often. Run it now: pwd
 
The commands you type are on the server. To run a command locally, prefix it with an exclamation mark. Try these commands : !pwd
                                               !ls



Change our local directory to /tmp by running : lcd /tmp




Now let's copy file f1.txt to the server : put f1.txt



Now to retriveve file f1.txt from server , use this command : get f1.txt




When finish with FTP session run the following command : quit





Now let's run some scp commands, to begin: cd /tmp




Create a test file by running : ls > f1.txt




Run the following command: scp f1.txt pi@192.168.157.128:/tmp . Enter password for user.





Assuming file f1.txt is on the remote /temp, to et it run: scp pi@192.168.157.128:/temp/f1.txt
Do not forget the colon above. Run ls -la to see how it went.





Part 3



Firstly, we need to install telnet server and check with cmd.exe. Run this command: telnet, it will appear as shown in figure below if already successfully installed telnet.




Run sudo apt-get update  on your raspberrypi. 





Run sudo apt-get install telnet to install telnet on raspberry.



After that, run telnet localhost (you may used either one according to your preferences)




Part 4



*Start the sshd service* (optional)
Go to search bar, find Windows PowerShell and run it as administrator. Then follow the step as shown on figure below to view status of OpenSSH server. Make sure OpenSSH Server is installed. 




Run the command: sudo su and run this command : ssh service status to check ssh is running or not if not run: ssh service start and run again ssh service status command.




After that run ip a to see to check ip address on raspberry and then run this command : ssh pi@ip address

Enter the password .




Run these following command : pwd 
                                                    uptime

                                                 



To exit the session, run this command: exit






Getting a web page without a browser - wget



Run the following command: cd /tmp
Then this command: wget www.google.com  (any website you want)




The default file will be named index.html. 

You can also refer to specific files that in the website, example: wget www.google.com/google.img




Comments