Changes for page SSH
Last modified by Aysegül Omus on 2024/05/16 10:30
From version 9.1
edited by Aysegül Omus
on 2024/04/18 13:28
on 2024/04/18 13:28
Change comment:
There is no comment for this version
To version 12.1
edited by Aysegül Omus
on 2024/05/16 10:30
on 2024/05/16 10:30
Change comment:
Renamed from xwiki:Informatik.Helpdesk.Ssh.WebHome
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -17,13 +17,13 @@ 17 17 18 18 = 0. Fingerprints = 19 19 20 - EinSchlüsselfingerprintbeiSSH isteinHashausdemPublicKey desHostsunddientderVerifikationundIdentifikationdesServers.Damitkannzum Beispielüberprüftwerden, obsich einHoständert(z.B.wennderDNSServergehackt wurdeund lxhalle.in.tum.deaufeinmalauf einenbösenServerweisenwürde).20 +A key fingerprint for SSH is a hash of the host's public key and is used to verify and identify the server. This can be used, for example, to check whether a host has changed (e.g. if the DNS server has been hacked and lxhalle.in.tum.de would suddenly point to a malicious server). 21 21 22 - Die ECDSAKeyswurdenaus Sicherheitsgründendeaktiviert.22 +The ECDSA keys have been deactivated for security reasons. 23 23 24 24 == lxhalle.in.tum.de == 25 25 26 - In derfolgendenTabellesinddieFingerprints für**lxhalle.in.tum.de** aufgelistet.26 +The following table lists the fingerprints for lxhalle.in.tum.de. 27 27 28 28 |= lxhalle|= MD5-Fingerprint|= SHA256-Fingerprint 29 29 | Ed25519 | ##MD5:f8:73:a4:f9:47:8e:a2:ba:11:59:19:35:bf:d6:c7:c4## | SHA256:dSj0mkyuOXEdpKGGJmXkvhDnvbjGmGCYQXA0pV8Pe4s ... ... @@ -32,7 +32,7 @@ 32 32 33 33 == ssh.ma.tum.de == 34 34 35 - In derfolgendenTabellesinddieFingerprints für**ssh.ma.tum.de** aufgelistet.35 +The following table lists the fingerprints for ssh.ma.tum.de. 36 36 37 37 |= ssh.ma.tum.de|= MD5-Fingerprint|= SHA256-Fingerprint 38 38 | Ed25519 | ##MD5:70:5d:b8:5f:51:69:60:07:22:a4:45:65:7b:c5:99:b9## | ##SHA256:EbNhVTkW+74PX0tQNb9bai0HXAVcQLC9lOeS+BgatPM## ... ... @@ -45,9 +45,9 @@ 45 45 46 46 = 1. OpenSSH = 47 47 48 - [[SSH>>https://www.ssh.com/]](Secure Shell) isteinTool fürdiesichereSystemverwaltung,DateiübertragungundandereKommunikationüber dasInternet odereinanderesnichtvertrauenswürdigesNetzwerk.EsverschlüsseltIdentitäten,Passwörterundübertragene Daten,damitdiesenicht abgehörtundgestohlenwerden können.[[OpenSSH>>https://www.openssh.com/]]isteineOpen-Source-ImplementierungdesSSH-Protokolls.48 +SSH (Secure Shell) is a tool for secure system administration, file transfer, and other communication via the Internet or another untrusted network. It encrypts identities, passwords and transmitted data so that they cannot be intercepted and stolen. OpenSSH is an open-source implementation of the SSH protocol. 49 49 50 -OpenSSH liefert folgendeToolsmit:50 +OpenSSH comes with the following tools: 51 51 52 52 * SSH (Secure Shell Client, login auf einem remote System, Aufbau von Tunnel) 53 53 * SCP (Secure Copy Protocol, cp über einen SSH Tunnel) ... ... @@ -56,7 +56,7 @@ 56 56 * sshd (SSH Server) 57 57 * sftp-server (SFTP Server) 58 58 59 -Auf Linux und MacOS ist OpenSSH in der Regel vorinstalliert und es exisitert auch eine Implementierung für Windows, die auf Windows 10 seit dem [[“Windows 10 fall creators update”>>https://github.com/PowerShell/Win32-OpenSSH/wiki/Project-Status]]mitgeliefert wird.59 +Auf Linux und MacOS ist OpenSSH in der Regel vorinstalliert und es exisitert auch eine Implementierung für Windows, die auf Windows 10 seit dem “Windows 10 fall creators update” mitgeliefert wird. 60 60 61 61 Unter Programme und Features lässt es sich seitdem aktivieren und seit etwa April 2018 sollte es standardmäßig aktiviert sein, wenn man auf dem aktuellstem Updatestand ist. 62 62 ... ... @@ -68,7 +68,7 @@ 68 68 69 69 == 1.1. SSH Verbindung mit Passwort == 70 70 71 - ÖffnenSiedas Terminal (MacOS / Linux) oderdie PowerShell (Windows). Indiesemkannman nunmit71 +Open the terminal (MacOS / Linux) or the PowerShell (Windows). In this you can now use 72 72 73 73 74 74 (% class="box" %) ... ... @@ -76,12 +76,12 @@ 76 76 $> ssh CIT-username@hostname 77 77 ))) 78 78 79 -ein eSSH-Verbindung aufbauen.79 +to establish an SSH connection. 80 80 81 81 82 82 83 83 84 - Also in unseremFall z.B84 +So in our case, for example 85 85 86 86 87 87 (% class="box" %) ... ... @@ -95,9 +95,8 @@ 95 95 ))) 96 96 97 97 98 +If the server is unknown, i.e. the connection is being established for the first time or the known_hosts file has been deleted, confirmation of the server's public key fingerprint is required. 98 98 99 -Falls der Server unbekannt ist, also die Verbindung zum ersten Mal aufgebaut wird oder die //known_hosts// Datei gelöscht wurde, ist eine Bestätigung des Fingerprints des public key des Servers gefragt. 100 - 101 101 (% class="box" %) 102 102 ((( 103 103 ~> The authenticity of host ‘<i>server (serverip)</i>’ can’t be established. ... ... @@ -105,7 +105,7 @@ 105 105 ~> Are you sure you want to continue connecting (yes/no)? 106 106 ))) 107 107 108 - FallsderFingerprintrichtig ist,kann dieAbfragebestätigtwerden. Nunwirdmannoch nachseinemPasswortgefragtwerdenundmansollteam Servereingeloggt sein.107 +If the fingerprint is correct, the query can be confirmed. Now you will be asked for your password and you should be logged in to the server. 109 109 110 110 {{html wiki="true"}} 111 111 <a name='OpenSSHKey'></a> ... ... @@ -114,9 +114,9 @@ 114 114 115 115 == 1.2. SSH-Verbindgung ohne Passwort (OpenSSH Konfiguration) == 116 116 117 - Mit derOpenSSHKonfigurationsdateienlassensichunter anderemAliase für SSHHosts anlegen undOptionensetzen. MehrInformationen unterhttps://www.ssh.com/ssh/config/116 +The OpenSSH configuration files can be used to create aliases for SSH hosts and set options, among other things. More information can be found at https:~/~/www.ssh.com/ssh/config/ 118 118 119 - Fallsdie OpenSSHKonfigurationsdatei nochnicht vorhandenist,kannmandieseeinfachmit118 +If the OpenSSH configuration file is not yet available, you can simply create it with 120 120 121 121 122 122 (% class="box" %) ... ... @@ -124,7 +124,7 @@ 124 124 touch ~~/.ssh/config 125 125 ))) 126 126 127 - erstellen.DanachöffnetmandieKonfigurationsdatei (config)miteinemTexteditorz.B. vi oder vim imTerminal.126 +to create. Then open the configuration file (config) with a text editor, e.g. vi or vim in the terminal. 128 128 129 129 (% class="box" %) 130 130 ((( ... ... @@ -131,12 +131,12 @@ 131 131 vim ~~/.ssh/config 132 132 ))) 133 133 134 - EinBeispielHosteintragsiehtwiefolgtaus:133 +An example host entry looks like this: 135 135 136 136 [[image:1677665498294-467.png]] 137 137 138 138 139 - Umeine SSH-VerbindgungohnePasswort zurLxhalleauszubauen,brauchtmanineKonfigurationsdateiwieunten138 +To extend an SSH connection to the Lxhalle without a password, you need a configuration file like the one below 140 140 141 141 [[image:1677665518714-502.png]] 142 142 ... ... @@ -143,9 +143,9 @@ 143 143 144 144 == 1.3. SSH Key == 145 145 146 -=== 1.3.1. Schlüsselpaar generieren (Private und Public) === 145 +=== 1.3.1. Generate key pairSchlüsselpaar generieren (Private und Public) === 147 147 148 - ZumGeneriereneinesSSHKeysfolgendesBefehl ausführen.147 +To generate an SSH key, execute the following command. 149 149 150 150 (% class="box" %) 151 151 ((( ... ... @@ -152,12 +152,12 @@ 152 152 ssh-keygen -t rsa -b 4096 153 153 ))) 154 154 155 -– b st ehtfürdieAnzahl derBits womitdieLängedesSchlüsselsbestimmtwerdenkann.154 +– b stands for the number of bits with which the length of the key can be determined. 156 156 157 -– t st ehtfürdenTypendesSchlüssels.156 +– t stands for the type of key. 158 158 159 159 160 - WennSiedasangebenwerden SienacheinemPfadnachgefragtwo dasgenerierteKey hinterlegtwerdensoll.159 +If you specify this, you will be asked for a path where the generated key should be stored. 161 161 162 162 {{code language="none"}} 163 163 $> ssh-keygen -t rsa -b 4096 ... ... @@ -183,9 +183,9 @@ 183 183 > +----[SHA256]-----+ 184 184 {{/code}} 185 185 186 -=== 1.3.2. ÖffentlichenSchlüsselaufServerübertragen===185 +=== 1.3.2. Transfer public key to server === 187 187 188 - DeröffentlicherSchlüsselmussauf denServerübertragenwerden.I.d.R.kannmandieseinfachüber //ssh-copy-id// erledigen.187 +The public key must be transferred to the server. This can usually be done simply via ssh-copy-id. 189 189 190 190 {{code language="none"}} 191 191 $> ssh-copy-id ITO-username@hostname ... ... @@ -200,7 +200,7 @@ 200 200 and check to make sure that only the key(s) you wanted were added. 201 201 {{/code}} 202 202 203 - JetztsolltederKeyaufdemServer als authorisierterKeyinstalliert wordensein undeinLoginmit202 +The key should now have been installed on the server as an authorized key and a login with 204 204 205 205 (% class="box" %) 206 206 ((( ... ... @@ -207,13 +207,13 @@ 207 207 ssh -i PfadZumKeyfile username@hostname 208 208 ))) 209 209 210 - möglichsein. AlternativkannmandasIdentityfilewieobenspezifiziertinderSSH-Configuration angeben undsichmit//ssh alias// verbinden.209 +should be possible. Alternatively, you can enter the identity file as specified above in the SSH configuration and connect with ssh alias. 211 211 212 212 213 213 214 214 === 1.3.3. SSH-Keygen Manpages === 215 215 216 - WennmanfolgendenBefehlim Terminalausführt,erfährt man mehrüberSSH-Keygen215 +If you execute the following command in the terminal, you can find out more about SSH-Keygen 217 217 218 218 {{code language="none"}} 219 219 $> ssh-keygen man ... ... @@ -252,9 +252,9 @@ 252 252 -n namespace -s signature_file [-r revocation_file] 253 253 {{/code}} 254 254 255 -== 1.4. Filetransfer mit SFTP ==254 +== 1.4. Filetransfer with SFTP == 256 256 257 - DasSecure File Transfer Protocol (SFTP)kanngenutztwerdenum Datenzuodervon einemRemote-Systemzu übertragen.256 +The Secure File Transfer Protocol (SFTP) can be used to transfer data to or from a remote system. 258 258 259 259 {{code language="none"}} 260 260 $> sftp ... ... @@ -265,9 +265,9 @@ 265 265 destination 266 266 {{/code}} 267 267 268 - Dazukannmaneinfachdasmit derOpenSSH-Implementierungmitgelieferte sftpToolnutzen.Dazueinfach in das Terminal/Powershellsftp eingeben.DieParameterindanalogzumsshBefehl,nur das mancheFlagsfehlen,wiezBX11-Forwarding.Mankannauch die inderSSH-Configdefinierten Hosts nutzen.267 +You can simply use the sftp tool supplied with the OpenSSH implementation. Simply enter sftp in the terminal/powershell. The parameters are analogous to the ssh command, except that some flags are missing, such as X11 forwarding. You can also use the hosts defined in the SSH-Config. 269 269 270 - z.B.also:269 +For example: 271 271 272 272 (% class="box" %) 273 273 ((( ... ... @@ -274,23 +274,23 @@ 274 274 $> sftp CIT-username@lxhalle.in.tum.de 275 275 ))) 276 276 277 -H ierkannman nuninteraktiveBefehlenutzenumzudengewüschten Dateien/OrtimDateisystemzu navigieren(z.B: ls, cd). Hierkannman nunmit //get/put//DateienbzwOrdner(dasFlag-r angeben,damitderOrdnerrekursivübertragenwird)herunter- bzw. hochladen.276 +Here you can now use interactive commands to navigate to the desired files/location in the file system (e.g.: ls, cd). Here you can now use get/put to download or upload files or folders (specify the -r flag so that the folder is transferred recursively). 278 278 279 -M ehrzumSFTP-ToolderOpenSSH-Implementierungfindetman im[[Manual>>https://man.openbsd.org/sftp]].278 +More about the SFTP tool of the OpenSSH implementation can be found in the [[Manual>>https://man.openbsd.org/sftp]]. 280 280 281 281 ---- 282 282 283 283 == 1.5. X11 Forwarding == 284 284 285 - UnterdenmeistenLinuxSystemendientdas [[X WindowsSystem>>https://de.wikipedia.org/wiki/X_Window_System]]der DarstellungeinergrafischenOberfläche.DieaktuelleVersion istXVersion 11kurzX11.Mit X11 Forwardingkannman nun aufeinemRemote-Systemeine Anwendungstartenund diegrafische DarstellunganeinenlokalenX11-Serverübertragen.284 +On most Linux systems, the X Windows system is used to display a graphical user interface. The current version is X version 11, or X11 for short. With X11 Forwarding, you can now start an application on a remote system and transfer the graphical display to a local X11 server. 286 286 287 - UmX11 Forwardingnutzen zu können,mussman nur beimssh-BefehldasX11 ForwardingFlagsetzen(also einfachein -Xhinzufügen). AlternativkannmanX11ForwardingauchinderSSH-Configaktivieren.286 +To be able to use X11 Forwarding, you only need to set the X11 Forwarding flag in the ssh command (i.e. simply add an -X). Alternatively, you can also activate X11 forwarding in the SSH config. 288 288 289 - Auf den meistenLinuxsystemenmit grafischerOberflächesollte ein X11ServervonWerkausmitgeliefertsein,sonstmuss man diesenausdenPaketquellennachinstallieren.(zBpacman -S xorg oder apt install xorg)288 +On most Linux systems with a graphical user interface, an X11 server should be supplied by default, otherwise, you will have to install it from the package sources (e.g. pacman -S xorg or apt install xorg). 290 290 291 - Unter Macbenötigtman seitMac OS X 10.5zusätzlicheBibliotheken.NäheresdazuaufderAppleSeite:290 +Since Mac OS X 10.5 you need additional libraries. More details on the Apple page:[[Informationen zu X11 für Mac>>https://support.apple.com/de-de/HT201341]]. 292 292 293 - UnterWindowsbenötigt man ebenso einen X11 Server.Dazubietetessich unter Windows 10an,dasLinuxSubsystem für Windows.(EinrichtungsieheweiteruntenimText). IndiesemLinuxfunktioniertesnunwieunter Linux nativ.Einfachdas entsprechendexorgPaketinstallierenund denxorg-Serverstarten.292 +An X11 server is also required under Windows. Under Windows 10, the Linux subsystem for Windows can be used for this (see below for setup). In this Linux it now works as under Linux natively. Simply install the corresponding xorg package and start the xorg server. 294 294 295 295 296 296 ... ... @@ -301,19 +301,19 @@ 301 301 [[image:Screenshot (28)ed.png]] 302 302 303 303 304 - Als Servername bei Computer**lxhalle.in.tum.de**eingebenund**Connect**klicken.303 +Enter lxhalle.in.tum.de as the server name for the computer and click Connect. 305 305 306 306 307 307 [[image:Screenshot (29)ed.png]] 308 308 309 309 310 -** Yes** klicken.309 +**click Yes**. 311 311 312 312 313 313 [[image:30ed.png]] 314 314 315 315 316 -CIT -KennungundPasswort eingeben,**OK** klicken.315 +Enter CIT ID and password, click OK. 317 317 318 318 319 319 [[image:Screenshot (31)ed.png]] ... ... @@ -326,22 +326,22 @@ 326 326 {{/html}} 327 327 328 328 329 -= 3. Linux Subsystem f ür Windows 10 =328 += 3. Linux Subsystem for Windows 10 = 330 330 331 - AufWindows 10 kannmanauch ein LinuxSubsystem installieren, dasssich indenWindowsKernelunddasWindowsDateisystemintegriert.EsisteinvollständigesLinux,dassallerdings imWindowsKernelläuft.330 +You can also install a Linux subsystem on Windows 10 that integrates into the Windows kernel and the Windows file system. It is a complete Linux that runs in the Windows kernel. 332 332 333 333 {{html wiki="true"}} 334 334 <a name='LinuxSubInstallation'></a> 335 335 {{/html}} 336 336 337 -== 3.1. Install ation==336 +== 3.1. Install == 338 338 339 - Mit Windows-Logo-Taste + X oder rechts klickaufdie Windowsflaggedas Direktlinkmenü öffnen unddort die Windows PowerShell (Administratoröffnen):338 +Open the direct link menu with the Windows logo key + X or right-click on the Windows flag and open Windows PowerShell (Administrator): 340 340 341 341 [[image:linux00.png||width="1000"]] 342 342 343 343 344 - DieBenutzerkontensteuerungwirdnunnachAdministratorberechtigungen fragen:343 +The user account control will now ask for administrator authorizations: 345 345 346 346 [[image:linux01.png||width="1000"]] 347 347 ... ... @@ -353,7 +353,7 @@ 353 353 Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux 354 354 {{/code}} 355 355 356 - eingebenundausführen.Falls das Featurenichtgefunden wird,istdasSystemvermutlichnichtaufdemaktuellstenStandundsollteaktualisiertwerden.355 +and run it. If the feature is not found, the system is probably not up to date and should be updated. 357 357 358 358 [[image:linux02.png||width="1000"]] 359 359 ... ... @@ -360,17 +360,17 @@ 360 360 [[image:linux03.png||width="1000"]] 361 361 362 362 363 - NachAbschlussderFeatureAktivierungden Rechnerneustarten.362 +After completing the feature activation, restart the computer. 364 364 365 365 [[image:linux04.png||width="1000"]] 366 366 367 367 368 - NachNeustartdesRechnersden**Microsoft Store**öffnen(z.B.: Startmenüöffnen undnach Microsoft Storesuchen).367 +After restarting the computer, open the Microsoft Store (e.g.: open the Start menu and search for Microsoft Store). 369 369 370 370 [[image:linux05.png||width="1000"]] 371 371 372 372 373 - Im MicrosoftStorenun nach Ubuntusuchen. AlternativxisterenOpenSUSE Leap, SUSE Linux Enterprise Server, Debianund KaliSubsystemefür Windows,die auchverwendetwerdenkönnenundüberdenMicrosoft Storeinstalliert werden können.372 +Now search for Ubuntu in the Microsoft Store. Alternatively, there are OpenSUSE Leap, SUSE Linux Enterprise Server, Debian and Kali subsystems for Windows, which can also be used and installed via the Microsoft Store. 374 374 375 375 [[image:linux06.png||width="1000"]] 376 376 ... ... @@ -379,19 +379,19 @@ 379 379 [[image:linux07.png||width="1000"]] 380 380 381 381 382 - NachAbschlussderInstallationdasSubsystemstarten(Kannmanauch überdasStartmenümachenz.B.einfachnach Ubuntusuchen)381 +After completing the installation, start the subsystem (can also be done via the start menu, e.g. simply search for Ubuntu) 383 383 384 384 [[image:linux08.png||width="1000"]] 385 385 386 386 387 387 388 - BeimerstenStart wirdnundasSubsystemeingerichtet.Dies wirdeinigeZeitin Anspruch nehmen.387 +The subsystem is now set up at the first start. This will take some time. 389 389 390 390 [[image:linux09.png||width="1000"]] 391 391 392 392 393 393 394 - UmdieEinrichtungabzuschließen, wirdnochnacheinem NutzernamenundPasswortfürdasLinuxSubsystemgefragt.HierkönnenSie freiwählenund sollteneinsicheresPasswort wählen.393 +To complete the setup, you will be asked for a username and password for the Linux subsystem. You can choose freely here and should choose a secure password. 395 395 396 396 [[image:linux10.png||width="1000"]] 397 397 ... ... @@ -401,9 +401,9 @@ 401 401 <a name='LinuxSubKonfiguration'></a> 402 402 {{/html}} 403 403 404 -== 3.2. Konfiguration ==403 +== 3.2. Configuration == 405 405 406 -OpenSSH kannnunwie unter Linuxverwendet werden.405 +OpenSSH can now be used under Linux. 407 407 408 408 [[image:linux11.png||width="1000"]] 409 409