SSH and SCP

HEIG-VD DAI - SSH and SCP

Link to the course

L. Delafontaine and H. Louis, with the help of GitHub Copilot.

This work is licensed under the CC BY-SA 4.0 license.

SSH and SCP

Objectives

  • Refresh on security
  • Acquire a virtual machine (= a server) on the cloud
  • Install and configure the virtual machine/server
  • Learn how to use the SSH protocol to connect to a remote server
  • Learn how to use the SCP protocol to transfer files to a remote server
SSH and SCP

A quick reminder about security

More details for this section in the course material. You can find other resources and alternatives as well.

SSH and SCP

A quick reminder about security

  • A secure protocol ensures the confidentiality of the data exchanged
  • Most secure protocols rely on cryptography
  • Cryptography is based on algorithms and keys
SSH and SCP

SSH

More details for this section in the course material. You can find other resources and alternatives as well.

SSH and SCP

SSH

  • Secure Shell
  • Uses TCP port 22
  • A protocol to connect to a remote server
  • Can be used to execute commands on a remote server
  • The standard way to connect to a remote server
SSH and SCP

SSH key algorithms

The most common key algorithms are:

  • RSA
  • DSA
  • ECDSA
  • Ed25519

Ed25519 and ECDSA are the recommended algorithms.

SSH and SCP

SSH key fingerprint

  • Short version of a public key
  • Used to verify the identity of a public key
  • Can help detect man-in-the-middle attacks
  • Stored in the ~/.ssh/known_hosts file
SSH and SCP

SSH key generation

  • Use the ssh-keygen command
  • Choose the key algorithm
  • Generate a private key and a public key
  • Can be done with or without a passphrase
SSH and SCP

SCP

More details for this section in the course material. You can find other resources and alternatives as well.

SSH and SCP

SCP

  • Secure Copy
  • Uses TCP port 22
  • A protocol to transfer files to/from a remote server
  • Can be used to transfer files between two remote servers as well
SSH and SCP

Questions

Do you have any questions?

SSH and SCP

Practical content

SSH and SCP

What will you do?

  • Acquire a virtual machine (= a server) on the cloud
  • Install and configure the virtual machine (SSH, Docker and Docker Compose)
  • Transfer files to/from the virtual machine with SCP
SSH and SCP

Now it's your turn!

  • Read the course material.
  • Do the practical content.
  • Ask questions if you have any.

➡️ Find the course on GitHub.

Do not hesitate to help each other! There's no need to rush!

SSH and SCP

Finished? Was it easy? Was it hard?

Can you let us know what was easy and what was difficult for you during this chapter?

This will help us to improve the course and adapt the content to your needs. If we notice some difficulties, we will come back to you to help you.

➡️ GitHub Discussions

You can use reactions to express your opinion on a comment!

SSH and SCP

What will you do next?

In the next chapter, you will learn the following topics:

  • Learn how to use HTTP, a high-level protocol for the web
  • Create your own simple web API with CRUD operations with Java
SSH and SCP

Sources