Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:linux:ssh [2023/10/18 22:49] – angelegt psycore | en:linux:ssh [2024/02/05 16:49] (current) – old revision restored (2024/01/24 11:23) psycore | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | {{tag> |
+ | ====== | ||
- | The pre-installed SSH daemon (sshd) is insecure in the basic configuration. To ensure greater protection, it is necessary to integrate a [[wpde> | + | The pre-installed SSH daemon (sshd) is insecure in the basic configuration. To ensure greater protection, it is necessary to integrate a [[wpde> |
- | ===== Create | + | ===== Generate |
- | First, we create a key pair under Linux: | + | Firstly, we create a key pair under Linux: |
<code bash> | <code bash> | ||
Line 19: | Line 20: | ||
35: | 35: | ||
</ | </ | ||
- | **Be sure to enter a password, otherwise you can access the server | + | **Be sure to enter a password, otherwise you can access the server |
- | We rename id_rsa.pub to authorised_keys and download id_rsa locally to our computer. **It is important to delete id_rsa securely afterwards!** (if necessary install wipe with //apt-get install wipe//) | + | We rename id_rsa.pub to authorised_keys and download id_rsa locally to the computer. **It is important to delete id_rsa securely afterwards!** (If necessary, install wipe with //apt-get install wipe//) |
<code bash>$ wipe id_rsa | <code bash>$ wipe id_rsa | ||
Line 39: | Line 40: | ||
===== Putty Private Key ===== | ===== Putty Private Key ===== | ||
- | Now we download [[http:// | + | Now we download [[http:// |
- | We need this key with the .ppk extension to log in later for putty. **Never upload this key to the server!** | + | We will need this key with the .ppk extension to log in to putty later. **Never upload this key to the server!** |
===== Login test ===== | ===== Login test ===== | ||
- | Now we test whether the connection is established with the generated key. To do this, we open putty.exe and enter the host name as usual. Before we click on **open** we switch to the left in the tree view to **Connection / SSH / Auth** and enter the following | + | Now we test whether the connection is established with the generated key. To do this, we open putty.exe and enter the host name as usual. Before we now click on **open** we switch to the left in the tree view to **Connection / SSH / Auth** and under **private key file for authentication** |
===== sshd configuration ===== | ===== sshd configuration ===== | ||
Line 82: | Line 83: | ||
<code bash>/ | <code bash>/ | ||
- | ==== Note ==== | + | ==== Hint ==== |
- | The current SSH session is not closed. **To correct configuration errors, the current session should remain open until everything is working | + | The current SSH session is not closed. **To correct configuration errors, the current session should remain open until everything is working |
- | + | ||
- | ===== Copyright and notes ===== | + | |
- | + | ||
- | © by [[psycore]] 2020 | + | |
- | + | ||
- | The author accepts no liability for any damage resulting from the use of this tutorial. This tutorial is written to the best of my knowledge and belief. The distribution of this tutorial is only allowed if the original text including copyright remains untouched. | + |