Changes for page SSH
Last modified by Aysegül Omus on 2024/05/16 10:30
From version 10.1
edited by Yunhao Wu
on 2024/04/18 13:40
on 2024/04/18 13:40
Change comment:
There is no comment for this version
To 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
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. wyun1 +XWiki.kahraman - Content
-
... ... @@ -17,13 +17,13 @@ 17 17 18 18 = 0. Fingerprints = 19 19 20 - AkeyfingerprintforSSH isahashofthehost's publickeyandis used toverifyandidentifytheserver.Thiscanbeused,for example,to checkwhethera hosthas changed (e.g.ifthe DNSserverhas beenhackedand lxhalle.in.tum.dewouldsuddenly point to amaliciousserver).20 +Ein Schlüsselfingerprint bei SSH ist ein Hash aus dem Public Key des Hosts und dient der Verifikation und Identifikation des Servers. Damit kann zum Beispiel überprüft werden, ob sich ein Host ändert (z.B. wenn der DNS Server gehackt wurde und lxhalle.in.tum.de auf einmal auf einen bösen Server weisen würde). 21 21 22 - The ECDSAkeyshavebeen deactivated forsecurity reasons.22 +Die ECDSA Keys wurden aus Sicherheitsgründen deaktiviert. 23 23 24 24 == lxhalle.in.tum.de == 25 25 26 - The followingtableliststhefingerprints for lxhalle.in.tum.de.26 +In der folgenden Tabelle sind die Fingerprints für **lxhalle.in.tum.de** aufgelistet. 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 - The followingtableliststhefingerprints for ssh.ma.tum.de.35 +In der folgenden Tabelle sind die Fingerprints für **ssh.ma.tum.de** aufgelistet. 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 (Secure Shell) is atool forsecuresystemadministration,filesferandothercommunicationvia the Internet or anotheruntrustednetwork.Itencryptsidentities,passwordsand transmitteddataso thattheycannot beinterceptedand stolen. OpenSSH isanopensourceimplementationof the SSHprotocol.48 +[[SSH>>https://www.ssh.com/]] (Secure Shell) ist ein Tool für die sichere Systemverwaltung, Dateiübertragung und andere Kommunikation über das Internet oder ein anderes nicht vertrauenswürdiges Netzwerk. Es verschlüsselt Identitäten, Passwörter und übertragene Daten, damit diese nicht abgehört und gestohlen werden können. [[OpenSSH>>https://www.openssh.com/]] ist eine Open-Source-Implementierung des SSH-Protokolls. 49 49 50 -OpenSSH comes withthefollowingtools:50 +OpenSSH liefert folgende Tools mit: 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” 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”>>https://github.com/PowerShell/Win32-OpenSSH/wiki/Project-Status]] 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 - Opentheterminal (MacOS / Linux) orthe PowerShell (Windows). Inthisyou can nowuse71 +Öffnen Sie das Terminal (MacOS / Linux) oder die PowerShell (Windows). In diesem kann man nun mit 72 72 73 73 74 74 (% class="box" %) ... ... @@ -76,12 +76,12 @@ 76 76 $> ssh CIT-username@hostname 77 77 ))) 78 78 79 - toestablish an SSHconnection.79 +eine SSH-Verbindung aufbauen. 80 80 81 81 82 82 83 83 84 - So inour case, forxample84 +Also in unserem Fall z.B 85 85 86 86 87 87 (% class="box" %) ... ... @@ -95,8 +95,9 @@ 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. 99 99 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 + 100 100 (% class="box" %) 101 101 ((( 102 102 ~> The authenticity of host ‘<i>server (serverip)</i>’ can’t be established. ... ... @@ -104,7 +104,7 @@ 104 104 ~> Are you sure you want to continue connecting (yes/no)? 105 105 ))) 106 106 107 - Ifthefingerprint iscorrect,thequery canbeconfirmed. Now you willbeaskedforyourpasswordandyoushouldbe logged intotheserver.108 +Falls der Fingerprint richtig ist, kann die Abfrage bestätigt werden. Nun wird man noch nach seinem Passwort gefragt werden und man sollte am Server eingeloggt sein. 108 108 109 109 {{html wiki="true"}} 110 110 <a name='OpenSSHKey'></a> ... ... @@ -113,9 +113,9 @@ 113 113 114 114 == 1.2. SSH-Verbindgung ohne Passwort (OpenSSH Konfiguration) == 115 115 116 - The OpenSSHconfigurationfilescanbe usedto createaliasesfor SSHhosts and setoptions, amongotherthings. Moreinformationcanbe found at https:~/~/www.ssh.com/ssh/config/117 +Mit der OpenSSH Konfigurationsdateien lassen sich unter anderem Aliase für SSH Hosts anlegen und Optionen setzen. Mehr Informationen unter https://www.ssh.com/ssh/config/ 117 117 118 - Ifthe OpenSSHconfigurationfilesnotyetavailable,you cansimplycreate itwith119 +Falls die OpenSSH Konfigurationsdatei noch nicht vorhanden ist, kann man diese einfach mit 119 119 120 120 121 121 (% class="box" %) ... ... @@ -123,7 +123,7 @@ 123 123 touch ~~/.ssh/config 124 124 ))) 125 125 126 - to create.Thenopentheconfigurationfile (config)withatext,e.g. vi or vim intheterminal.127 +erstellen. Danach öffnet man die Konfigurationsdatei (config) mit einem Texteditor z.B. vi oder vim im Terminal. 127 127 128 128 (% class="box" %) 129 129 ((( ... ... @@ -130,12 +130,12 @@ 130 130 vim ~~/.ssh/config 131 131 ))) 132 132 133 - An examplehostylookslike this:134 +Ein Beispiel Hosteintrag sieht wie folgt aus: 134 134 135 135 [[image:1677665498294-467.png]] 136 136 137 137 138 - ToextendanSSHconnectiontothe Lxhallewithoutapassword,you needa configurationfilelike theone below139 +Um eine SSH-Verbindgung ohne Passwort zur Lxhalle auszubauen, braucht man eine Konfigurationsdatei wie unten 139 139 140 140 [[image:1677665518714-502.png]] 141 141 ... ... @@ -142,9 +142,9 @@ 142 142 143 143 == 1.3. SSH Key == 144 144 145 -=== 1.3.1. Generate key pairSchlüsselpaar generieren (Private und Public) ===146 +=== 1.3.1. Schlüsselpaar generieren (Private und Public) === 146 146 147 - Togeneratean SSHkey,executetheollowingcommand.148 +Zum Generieren eines SSH Keys folgendes Befehl ausführen. 148 148 149 149 (% class="box" %) 150 150 ((( ... ... @@ -151,12 +151,12 @@ 151 151 ssh-keygen -t rsa -b 4096 152 152 ))) 153 153 154 -– b st andsforthe numberof bits withwhich thelength of thekeycanbedetermined.155 +– b steht für die Anzahl der Bits womit die Länge des Schlüssels bestimmt werden kann. 155 155 156 -– t st andsforthetypeofkey.157 +– t steht für den Typen des Schlüssels. 157 157 158 158 159 - If you specifythis,youwillbe askedforapathwherethegeneratedkeyshouldbe stored.160 +Wenn Sie das angeben werden Sie nach einem Pfad nachgefragt wo das generierte Key hinterlegt werden soll. 160 160 161 161 {{code language="none"}} 162 162 $> ssh-keygen -t rsa -b 4096 ... ... @@ -182,9 +182,9 @@ 182 182 > +----[SHA256]-----+ 183 183 {{/code}} 184 184 185 -=== 1.3.2. Transfer publickeytoserver ===186 +=== 1.3.2. Öffentlichen Schlüssel auf Server übertragen === 186 186 187 - Thepublickeymustbe transferredto theserver.Thiscanusuallybedoneimplyvia ssh-copy-id.188 +Der öffentlicher Schlüssel muss auf den Server übertragen werden. I.d.R. kann man dies einfach über //ssh-copy-id// erledigen. 188 188 189 189 {{code language="none"}} 190 190 $> ssh-copy-id ITO-username@hostname ... ... @@ -199,7 +199,7 @@ 199 199 and check to make sure that only the key(s) you wanted were added. 200 200 {{/code}} 201 201 202 - Thekeyshouldnow havebeeninstalledon theserver as an authorizedkey andaloginwith203 +Jetzt sollte der Key auf dem Server als authorisierter Key installiert worden sein und ein Login mit 203 203 204 204 (% class="box" %) 205 205 ((( ... ... @@ -206,13 +206,13 @@ 206 206 ssh -i PfadZumKeyfile username@hostname 207 207 ))) 208 208 209 - shouldbe possible. Alternatively,you canentertheidentityasspecifiedaboveinthe SSHconfiguration and connectwithssh alias.210 +möglich sein. Alternativ kann man das Identityfile wie oben spezifiziert in der SSH-Configuration angeben und sich mit //ssh alias// verbinden. 210 210 211 211 212 212 213 213 === 1.3.3. SSH-Keygen Manpages === 214 214 215 - If youexecutethefollowingcommandintheterminal,you canfindout moreaboutSSH-Keygen216 +Wenn man folgenden Befehl im Terminal ausführt, erfährt man mehr über SSH-Keygen 216 216 217 217 {{code language="none"}} 218 218 $> ssh-keygen man ... ... @@ -251,9 +251,9 @@ 251 251 -n namespace -s signature_file [-r revocation_file] 252 252 {{/code}} 253 253 254 -== 1.4. Filetransfer withSFTP ==255 +== 1.4. Filetransfer mit SFTP == 255 255 256 - TheSecure File Transfer Protocol (SFTP)canbesedtotransferatoorfroma remotesystem.257 +Das Secure File Transfer Protocol (SFTP) kann genutzt werden um Daten zu oder von einem Remote-System zu übertragen. 257 257 258 258 {{code language="none"}} 259 259 $> sftp ... ... @@ -264,9 +264,9 @@ 264 264 destination 265 265 {{/code}} 266 266 267 - Youcansimplyusethesftptool supplied withthe OpenSSHimplementation.Simplyenter sftpintheterminal/powershell.Theparameters are analogousto thesshcommand,except thatsomeflagsaremissing,suchasX11forwarding.You can alsouse thehostsdefinedinthe SSH-Config.268 +Dazu kann man einfach das mit der OpenSSH -Implementierung mitgelieferte sftp Tool nutzen. Dazu einfach in das Terminal/ Powershell sftp eingeben. Die Parameter sind analog zum ssh Befehl, nur das manche Flags fehlen, wie zB X11-Forwarding. Man kann auch die in der SSH-Config definierten Hosts nutzen. 268 268 269 - Forexample:270 +z.B. also: 270 270 271 271 (% class="box" %) 272 272 ((( ... ... @@ -273,23 +273,23 @@ 273 273 $> sftp CIT-username@lxhalle.in.tum.de 274 274 ))) 275 275 276 -Her eyou can nowuseinteractivecommandstonavigatetothedesiredfiles/location in thefilesystem(e.g.: ls, cd). Hereyou can nowuseget/put todownloadoruploadfiles orfolders(specifythe-rflagso thatthefolderis transferredrecursively).277 +Hier kann man nun interaktive Befehle nutzen um zu den gewüschten Dateien/ Ort im Dateisystem zu navigieren (z.B: ls, cd). Hier kann man nun mit //get/put// Dateien bzw Ordner(das Flag -r angeben, damit der Ordner rekursiv übertragen wird) herunter- bzw. hochladen. 277 277 278 -M oreabouttheSFTPtoolof the OpenSSHimplementationcanbefoundinthe[[Manual>>https://man.openbsd.org/sftp]].279 +Mehr zum SFTP-Tool der OpenSSH-Implementierung findet man im [[Manual>>https://man.openbsd.org/sftp]]. 279 279 280 280 ---- 281 281 282 282 == 1.5. X11 Forwarding == 283 283 284 - On most Linuxsystems,the X Windowssystemisusedto displayagraphical user interface.Thecurrentversion is Xversion 11,or X11for short.WithX11 Forwarding,you canowstart anapplicationon aremotesystemand transferhe graphicaldisplaytoa local X11server.285 +Unter den meisten Linux Systemen dient das [[X Windows System>>https://de.wikipedia.org/wiki/X_Window_System]] der Darstellung einer grafischen Oberfläche. Die aktuelle Version ist X Version 11 kurz X11. Mit X11 Forwarding kann man nun auf einem Remote-System eine Anwendung starten und die grafische Darstellung an einen lokalen X11-Server übertragen. 285 285 286 - Tobe able to useX11 Forwarding,youonlyneedtosetthe X11 Forwardingflaginthe ssh command(i.e. simplyaddan -X). Alternatively,you can alsoactivateX11forwarding inthe SSHconfig.287 +Um X11 Forwarding nutzen zu können, muss man nur beim ssh-Befehl das X11 Forwarding Flag setzen (also einfach ein -X hinzufügen). Alternativ kann man X11 Forwarding auch in der SSH-Config aktivieren. 287 287 288 - On most Linuxswithagraphical userinterface,an X11servershouldbesupplied by default, otherwiseyouwillhaveoinstallt from thepackage sources (e.g.pacman -S xorg or apt install xorg).289 +Auf den meisten Linuxsystemen mit grafischer Oberfläche sollte ein X11 Server von Werk aus mitgeliefert sein, sonst muss man diesen aus den Paketquellen nachinstallieren.(zB pacman -S xorg oder apt install xorg) 289 289 290 - Since Mac OS X 10.5youneed additionallibraries.More detailsonthe Applepage:[[Informationen zu X11 für Mac>>https://support.apple.com/de-de/HT201341]].291 +Unter Mac benötigt man seit Mac OS X 10.5 zusätzliche Bibliotheken. Näheres dazu auf der Apple Seite: [[Informationen zu X11 für Mac>>https://support.apple.com/de-de/HT201341]]. 291 291 292 - AnX11 serveris alsorequired underWindows.Under Windows 10,theLinuxsubsystem for Windowsanbe used for this(seebelowforsetup). Inthis Linux it nowworksasunder Linux natively.Simply install thecorrespondingxorgpackageandstartthe xorgserver.293 +Unter Windows benötigt man ebenso einen X11 Server. Dazu bietet es sich unter Windows 10 an, das Linux Subsystem für Windows.(Einrichtung siehe weiter unten im Text). In diesem Linux funktioniert es nun wie unter Linux nativ. Einfach das entsprechende xorg Paket installieren und den xorg-Server starten. 293 293 294 294 295 295 ... ... @@ -300,19 +300,19 @@ 300 300 [[image:Screenshot (28)ed.png]] 301 301 302 302 303 - Enter lxhalle.in.tum.deas theservernamefor the computer andclickConnect.304 +Als Servername bei Computer **lxhalle.in.tum.de** eingeben und **Connect** klicken. 304 304 305 305 306 306 [[image:Screenshot (29)ed.png]] 307 307 308 308 309 -** clickYes**.310 +**Yes** klicken. 310 310 311 311 312 312 [[image:30ed.png]] 313 313 314 314 315 - EnterCITID andpassword,clickOK.316 +CIT-Kennung und Passwort eingeben, **OK** klicken. 316 316 317 317 318 318 [[image:Screenshot (31)ed.png]] ... ... @@ -325,22 +325,22 @@ 325 325 {{/html}} 326 326 327 327 328 -= 3. Linux Subsystem f or Windows 10 =329 += 3. Linux Subsystem für Windows 10 = 329 329 330 - Youcanalsoinstalla Linuxsubsystemon Windows10thatintegrates intothe WindowskernelandtheWindowsfile.It isacomplete Linuxthatruns intheWindowskernel.331 +Auf Windows 10 kann man auch ein Linux Subsystem installieren, dass sich in den Windows Kernel und das Windows Dateisystem integriert. Es ist ein vollständiges Linux, dass allerdings im Windows Kernel läuft. 331 331 332 332 {{html wiki="true"}} 333 333 <a name='LinuxSubInstallation'></a> 334 334 {{/html}} 335 335 336 -== 3.1. Install == 337 +== 3.1. Installation == 337 337 338 - Open the directlink menu with theWindowslogokey+ X or right-clickonthe WindowspenWindows PowerShell (Administrator):339 +Mit Windows-Logo-Taste + X oder rechts klick auf die Windowsflagge das Direktlinkmenü öffnen und dort die Windows PowerShell (Administrator öffnen): 339 339 340 340 [[image:linux00.png||width="1000"]] 341 341 342 342 343 - The useraccountcontrolwillnowaskfor administratorauthorizations:344 +Die Benutzerkontensteuerung wird nun nach Administratorberechtigungen fragen: 344 344 345 345 [[image:linux01.png||width="1000"]] 346 346 ... ... @@ -352,7 +352,7 @@ 352 352 Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux 353 353 {{/code}} 354 354 355 - andrunit. Ifthefeatureisnot found, thesystemis probablynot uptodate andshouldbe updated.356 +eingeben und ausführen. Falls das Feature nicht gefunden wird, ist das System vermutlich nicht auf dem aktuellsten Stand und sollte aktualisiert werden. 356 356 357 357 [[image:linux02.png||width="1000"]] 358 358 ... ... @@ -359,17 +359,17 @@ 359 359 [[image:linux03.png||width="1000"]] 360 360 361 361 362 - Aftercompletingthefeatureactivation,restartthecomputer.363 +Nach Abschluss der Feature Aktivierung den Rechner neustarten. 363 363 364 364 [[image:linux04.png||width="1000"]] 365 365 366 366 367 - Afterrestartingthe computer,opentheMicrosoft Store(e.g.:open theStartuandsearchforMicrosoft Store).368 +Nach Neustart des Rechners den **Microsoft Store **öffnen (z.B.: Startmenü öffnen und nach Microsoft Store suchen). 368 368 369 369 [[image:linux05.png||width="1000"]] 370 370 371 371 372 - Nowsearch for Ubuntu in theMicrosoft Store. Alternatively,thereareOpenSUSE Leap, SUSE Linux Enterprise Server, Debianand Kalisubsystemsfor Windows,whichcanalso beusedandinstalledviathe Microsoft Store.373 +Im Microsoft Store nun nach Ubuntu suchen. Alternativ existeren OpenSUSE Leap, SUSE Linux Enterprise Server, Debian und Kali Subsysteme für Windows, die auch verwendet werden können und über den Microsoft Store installiert werden können. 373 373 374 374 [[image:linux06.png||width="1000"]] 375 375 ... ... @@ -378,19 +378,19 @@ 378 378 [[image:linux07.png||width="1000"]] 379 379 380 380 381 - Aftercompletingtheinstallation,start thesubsystem (can alsobe done via the startu,e.g.simplysearchforUbuntu)382 +Nach Abschluss der Installation das Subsystem starten (Kann man auch über das Startmenü machen z.B. einfach nach Ubuntu suchen) 382 382 383 383 [[image:linux08.png||width="1000"]] 384 384 385 385 386 386 387 - The subsystemisnowsetup atthefirststart.This willtakesome time.388 +Beim ersten Start wird nun das Subsystem eingerichtet. Dies wird einige Zeit in Anspruch nehmen. 388 388 389 389 [[image:linux09.png||width="1000"]] 390 390 391 391 392 392 393 - To completethesetup,youwill beaskedfora userandpasswordfortheLinuxsubsystem.Youcanchoose freelyhereand shouldchooseasecurepassword.394 +Um die Einrichtung abzuschließen, wird noch nach einem Nutzernamen und Passwort für das Linux Subsystem gefragt. Hier können Sie freiwählen und sollten ein sicheres Passwort wählen. 394 394 395 395 [[image:linux10.png||width="1000"]] 396 396 ... ... @@ -400,9 +400,9 @@ 400 400 <a name='LinuxSubKonfiguration'></a> 401 401 {{/html}} 402 402 403 -== 3.2. Configuration ==404 +== 3.2. Konfiguration == 404 404 405 -OpenSSH can nowbe used as under Linux.406 +OpenSSH kann nun wie unter Linux verwendet werden. 406 406 407 407 [[image:linux11.png||width="1000"]] 408 408