SSH Verbindung Proxmox

fantozzi

Member
Dec 7, 2023
79
0
6
Hallo zusammen,

ich beschäftige mich gerade im Zusammenhang mit der Erstellung eines LXC Containers mit dem Thema "SSH Schlüssel" statt ein Passwort zu vergeben. Dazu habe ich mir bereits das ein oder andere Tutorial angeschaut. Was mir noch nicht so klar ist wäre folgendes...wenn ich den Befehl "ls -l ~/.ssh" eingebe, sehe ich folgende Dateien:

lrwxrwxrwx 1 root root 29 Apr 28 13:37 authorized_keys -> /etc/pve/priv/authorized_keys
-rw-r----- 1 root root 117 Apr 28 13:37 config
-rw------- 1 root root 1811 Apr 28 13:37 id_rsa
-rw-r--r-- 1 root root 390 Apr 28 13:37 id_rsa.pub

Ich dachte man müsste zunächst einmal ein Keygen-Paar erstellen?
 
Ja musst du ja auch.

ssh-keygen -t ECDSA

Dann bekommst du das File das du kopieren kannst

Code:
-rw------- 1 root root  505 Mar 29 10:24 id_ecdsa
-rw-r--r-- 1 root root  171 Mar 29 10:24 id_ecdsa.pub
 
Last edited:
PVE kommt schon mit vorgenerierten wegen Clustering. Solltest du dir dann aber wie gesagt zusätzlich eigene Keys erstellen und der "authorized_keys" hinzufügen. Und du bist da gerade bei den Keys für den PVE Host. Für den LXC müsste du die nochmal erneut definieren.
 
Ok verstehe...kann man theoretisch einem Container auch noch im Nachhinein einen öffentlichen Key hinzufügen?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!