Difference between revisions of "Network Protocols"

From UCT EE Wiki
Jump to navigation Jump to search
(Created page with "= Overview = This page covers network protocols that you may find useful. = SSH = SSH enables you to remotely access a machine through a network. Basic ssh usage is as follo...")
 
Line 24: Line 24:
 
<ol>
 
<ol>
  
<li>You will need to ensure the device you want to VNC in to has a VNC server. For instructions on doing this on the Raspberry Pi, read [[RaspberryPi:Services]] </li>
+
<li>You will need to ensure the device you want to VNC in to has a VNC server. For instructions on doing this on the Raspberry Pi, read [[RaspberryPi:Networking#VNC]] </li>
  
 
<li>Download a viewer<br />
 
<li>Download a viewer<br />

Revision as of 10:48, 6 February 2020

Overview

This page covers network protocols that you may find useful.

SSH

SSH enables you to remotely access a machine through a network. Basic ssh usage is as follows:

$ ssh username@ip

FTP

Occasionally you may want to use a GUI to browse and transfer files. The File Transfer Protocol (FTP) is a standard network protocol used for the transfer of computer files between a client and server on a computer network. FTP is built on a client-server model architecture using separate control and data connections between the client and the server.

FileZilla is a free to use FTP program available for Windows and Linux. Download and install it.

When you launch FileZilla, a GUI with a few options across the top will be shown. In “Host”, enter in “sftp://192.168.137.15”. In “Username” and “Password” enter in the username and password you use to SSH in to your machine. Click “Quickconnect”

When connecting for the first time, you can choose to save the password or set a master password. Neither of these are necessary. You will be asked to add the server’s host key. Click “always trust this host, add this key to the cache” and select “OK”.

You will now be able to browse the files on the Raspberry Pi, and drag and drop from the Pi to your computer, or from the computer to your Pi.

VNC

In computing, Virtual Network Computing (VNC) is a graphical desktop-sharing system that uses the Remote Frame Buffer protocol (RFB) to remotely control another computer.

There are various options for VNC servers. For example, Raspbian comes installed with Real VNC but it needs to be enabled. Other options, such as tightVNC and ultraVNC also exist and can also be used.

  1. You will need to ensure the device you want to VNC in to has a VNC server. For instructions on doing this on the Raspberry Pi, read RaspberryPi:Networking#VNC
  2. Download a viewer
    VNC Viewer is available at this URL:
    https://www.realvnc.com/en/connect/download/viewer/
    Download your choice of app (For example the standalone installer or the Chrome App)
  3. Set up the connection
    • Open up VNC viewer
    • Enter the IP of the machine you'd like to connect to
    • Click connect
    • You will need log in

SCP

SCP or “Secure Copy” is a protocol that allows you to transfer files. To read all the details relating to scp, run man scp on your linux machine. The basic format of the command is as follows:

$ scp <local_file> <username>@<destination_ip>:<source_directory_location>

As an example, this is what connecting to a Raspberry Pi at 192.186.137.15 would look like:

  • Sending a single file from your computer to the Pi

     $ scp <file_name> <username>@192.168.1.15:
  • Sending a folder from your computer to the Pi

     $ scp -r <folder_name> <username>@192.168.1.15:
  • Sending a single file from your computer to a specific folder on the Pi:

     $ scp <file_name> <username>@192.168.1.15:<destination_directory>

Using SCP on Windows

On Windows, SCP may not be enabled. You can get around it by using the pscp command, included in the full PuTTY suite. It operates in the exact same way, but instead of running scp, you need to run pscp.