Zum Inhalt springen

Dienste/SSH/en: Unterschied zwischen den Versionen

Aus Technik-Wiki
Manal (Diskussion | Beiträge)
Die Seite wurde neu angelegt: „If you used the default path for the key files when generating the key pair, the SSH client will automatically detect and try to use the private key.“
FuzzyBot (Diskussion | Beiträge)
Übernehme Bearbeitung einer neuen Version der Quellseite
 
Zeile 13: Zeile 13:
; login.informatik.uni-bremen.de
; login.informatik.uni-bremen.de
: Login server with Linux.
: Login server with Linux.
; Login-smartos.informatik.uni-bremen.de
; login-smartos.informatik.uni-bremen.de
: Login server on a [https://en.wikipedia.org/wiki/SmartOS SmartOS] zone.
: Login server on a [https://en.wikipedia.org/wiki/SmartOS SmartOS] zone.
; login-freebsd.informatik.uni-bremen.de
; login-freebsd.informatik.uni-bremen.de
Zeile 28: Zeile 28:


Current list of host keys for FB3 computers in OpenSSH format: [http://www.informatik.uni-bremen.de/t2/ssh/out/openssh/ssh_known_hosts ssh_known_hosts]
Current list of host keys for FB3 computers in OpenSSH format: [http://www.informatik.uni-bremen.de/t2/ssh/out/openssh/ssh_known_hosts ssh_known_hosts]
<!-- Seit Ewigkeiten nicht mehr aktualisiert
Die aktuelle Public-Key-Liste der FB3-Hosts als Registry-File ([http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY] unter Windows): [http://www.informatik.uni-bremen.de/t2/ssh/doc/ssh_known_hosts.reg ssh_known_hosts.reg]
Die aktuelle Liste der Fingerprints von FB3-Hosts: [http://www.informatik.uni-bremen.de/t2/ssh/doc/ssh_known_hosts_fp.txt Fingerprints]
-->
<span id="Zugriff_auf_Dateien_im_FB3-Netz"></span>
<span id="Zugriff_auf_Dateien_im_FB3-Netz"></span>
== Accessing files in the FB3 network ==
== Accessing files in the FB3 network ==
Zeile 49: Zeile 42:
== Setting up public key authentication ==
== Setting up public key authentication ==


This guide applies to Linux, macOS, and Windows.
<div class="mw-translate-fuzzy">
This guide applies to all operating systems that have an [https://www.openssh.com/ OpenSSH] client available, which includes among other Linux, macOS, and Windows.
</div>


OpenSSH is part of the operating system in current Windows versions but may need to be activated. See [[Special:MyLanguage/Dienste/SSH/Windows|here]] for a guide on how to do this.
OpenSSH is part of the operating system in current Windows versions but may need to be activated. See [[Special:MyLanguage/Dienste/SSH/Windows|here]] for a guide on how to do this.

Aktuelle Version vom 29. September 2025, 12:50 Uhr

SSH

On many Linux/Unix computers at the FB3, you can log in via SSH. This page provides instructions for using this service, as well as a list of host keys from known SSH servers in the faculty network.

The login via SSH is done exclusively via public key authentication.

FB3 computers that can be accessed via SSH

This is a non-exhaustive list of FB3 computers that can be accessed via SSH:

login.informatik.uni-bremen.de
Login server with Linux.
login-smartos.informatik.uni-bremen.de
Login server on a SmartOS zone.
login-freebsd.informatik.uni-bremen.de
Login server with FreeBSD.
(x01-x10).informatik.uni-bremen.de
Linux computers in the practicum area.
(m01-m06).informatik.uni-bremen.de
macOS computers (Intel) in the Praktikumspool.
(mm1-mm5).informatik.uni-bremen.de
macOS-Rechner (ARM) in the Praktikumspool.

SSH host keys of FB3 computers

Current list of host keys for FB3 computers in OpenSSH format: ssh_known_hosts

Accessing files in the FB3 network

FB3 computers that can be accessed via SSH typically mount various NFS file shares from the network, which can be found under /home. Among others, this includes the home directories and the personal websites.

This allows remote access via SFTP through SSH.

It should be noted that not all available directories under /home may always be listed. These will be automatically mounted when accessing the path.

For example, it may happen that ls /home does not show an entry for wwwu, but cd /home/wwwu/$USER still works (also, wwwu will be displayed in /home after accessing it once).

Setting up public key authentication

This guide applies to all operating systems that have an OpenSSH client available, which includes among other Linux, macOS, and Windows.

OpenSSH is part of the operating system in current Windows versions but may need to be activated. See here for a guide on how to do this.

For the login, a public and a private key are required. The public key is stored on the SSH server and can be published or shared with others without concern, while the private key is solely possessed by the client and should be kept secret under all circumstances.

Common Windows clients, such as PuTTY and WinSCP, can utilize the SSH agent included in current Windows versions for authentication, so no separate configuration or private keys in other formats are necessary. See here for a guide on setting this up.

Generatiang a keypair

To generate a key pair, the following command can be executed on the client machine:

ssh-keygen -t ed25519

It generates the files id_ed25519 (private key) and /.ssh/id_ed25519.pub (public key) in the directory ~/.ssh. With the parameter -f $FILENAME, the file names and paths can be customized.

The command prompts for a so-called passphrase to be entered. This is used to encrypt the private key, so it can only be used in conjunction with the passphrase.

Warning Warning: Skipping a passphrase poses a significant security risk. If the private key falls into the wrong hands, it can be easily used for authentication without any further action required.

Installing public keys on SSH servers

If you place a public key in your home directory, you can automatically log in to all FB3 computers that mount it (and allow login via SSH).

Using the example of the key pair generated above, you need to insert the contents of the file id_ed25519.pub (NOT id_ed25519) into the file .ssh/authorized_keys. If the .ssh directory does not exist, you can easily create it as follows:

mkdir ~/.ssh
chmod 700 .ssh

If you are not on-site to place your public key directly on a computer, you can instead use the FB3 user tools. The public keys stored there are not placed in the home directory but are saved in a database, so you may only be able to log in to certain computers (see the text on the linked page).

Using private keys

If you used the default path for the key files when generating the key pair, the SSH client will automatically detect and try to use the private key.

If you chose a different path or filename, you can specify the path to the private key as follows:

ssh -i /pfad/zum/privaten/schlüssel zielhost

Alternatively, you can use the configuration file ~/.ssh/config. See the OpenSSH documentation for more information on this.