0Pricing
Linux Command Line Mastery · Lektion

Sicherer Fernzugriff: `ssh` und `scp`

Meistern Sie die Secure Shell für den Fernzugriff auf Server und das sichere Kopieren von Dateien zwischen Systemen.

Sicherer Fernzugriff: `ssh` und `scp` ist eine kostenlose Linux Command Line Mastery-Lektion auf CoddyKit. Dies ist Lektion 3 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des Linux Command Line Mastery-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der Linux Command Line Mastery-Kurs umfasst insgesamt 4 Lektionen.

Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.

Welcome to Secure Remote Access!

In this lesson, you'll learn how to connect to remote computers and transfer files securely using the Linux terminal.

We'll cover two essential tools: ssh for secure remote login and scp for secure file copying.

Secure Shell (SSH) Explained

SSH, or Secure Shell, is a network protocol that allows you to establish a secure, encrypted connection to a remote server over an unsecured network.

  • It provides a secure channel over an unsecured network by using strong cryptography.
  • It's commonly used for remote command-line login and remote command execution.

Your First SSH Connection

To connect to a remote server using SSH, you need the username on the remote server and its hostname or IP address.

The basic command is ssh username@hostname_or_ip. Try running the example below, replacing the placeholder with an actual host if you have one, or just observing the syntax.

ssh your_username@example.com

SSH with IP Address

Instead of a hostname (like example.com), you can also use the server's IP address. This is common when setting up new servers or in local networks.

The process is identical; just swap the hostname for the IP.

ssh your_username@192.168.1.100

Connecting on a Different Port

By default, SSH uses port 22. However, for security reasons or specific configurations, servers might use a different port (e.g., 2222).

You can specify a different port using the -p option followed by the port number.

ssh -p 2222 your_username@example.com

Secure Copy (SCP) Explained

SCP, or Secure Copy Protocol, is a command-line utility that allows you to securely copy files and directories between local and remote hosts, or between two remote hosts.

  • It uses SSH for data transfer and authentication.
  • This means your file transfers are encrypted and secure.

SCP: Sending Files to Remote

To copy a file from your local machine to a remote server, specify the local file path first, then the remote destination (username@host:path).

Remember to replace placeholders with your actual details.

scp local_file.txt your_username@example.com:/home/your_username/

SCP: Getting Files from Remote

To copy a file from a remote server to your local machine, the syntax is reversed: remote source first, then local destination.

You can specify a local directory, and the file will be copied into it.

scp your_username@example.com:/remote/path/file.log ./downloads/

SCP: Copying Entire Directories

If you need to copy an entire directory (folder) and its contents, you'll use the -r (recursive) option with scp.

This tells scp to copy all subdirectories and files within the specified folder.

scp -r local_folder/ your_username@example.com:/remote/backups/

Quick Check: Remote Access Tools

Which of the following commands are primarily used for secure remote access or secure file transfer in a Linux environment?

Recap: SSH and SCP Mastery

Great job! You've learned the fundamentals of secure remote access and file transfer.

  • ssh lets you securely log into and control remote servers.
  • scp allows you to securely copy files and directories between local and remote systems.
  • Both use encryption to protect your data during transfer.

These commands are indispensable for server administration and development!

Häufig gestellte Fragen

Ist die Lektion „Sicherer Fernzugriff: `ssh` und `scp`“ kostenlos?

Ja — der vollständige Text von „Sicherer Fernzugriff: `ssh` und `scp`“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des Linux Command Line Mastery-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der Linux Command Line Mastery-Kurs umfasst insgesamt 4 Lektionen.

Was lerne ich in „Sicherer Fernzugriff: `ssh` und `scp`“?

Meistern Sie die Secure Shell für den Fernzugriff auf Server und das sichere Kopieren von Dateien zwischen Systemen. Du übst Linux Command Line Mastery mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.

Brauche ich Erfahrung, um Linux Command Line Mastery zu starten?

Keine Vorkenntnisse erforderlich. Linux Command Line Mastery auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 3 von 4.

Wie lange dauert die Lektion „Sicherer Fernzugriff: `ssh` und `scp`“?

Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.

Kann ich in dieser Linux Command Line Mastery-Lektion Code schreiben und ausführen?

Ja. Jede Linux Command Line Mastery-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.

Alle Lektionen in diesem Kurs

  1. Benutzer- und Gruppenverwaltung: `useradd`, `usermod`, `groupadd`
  2. Einführung in Netzwerkbefehle: `ping`, `ip`, `netstat`
  3. Sicherer Fernzugriff: `ssh` und `scp`
  4. Dateiberechtigungen und Besitz mit chmod und chown
← Zurück zu Linux Command Line Mastery