Ubuntu SSH Key instasllieren: Unterschied zwischen den Versionen
Erscheinungsbild
Die Seite wurde neu angelegt: „als erstes muss auf dem Server folgende Ordner und Datei erstellet werden. <syntaxhighlight lang="bash"> mkdir -p .ssh cat > .ssh/authorized_keys chmod go-w ~…“ |
Keine Bearbeitungszusammenfassung |
||
| Zeile 8: | Zeile 8: | ||
chmod 600 ~/.ssh/authorized_keys | chmod 600 ~/.ssh/authorized_keys | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Auf DAN ausführen: | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
cat ~/.ssh/id_rsa.pub | ssh $USERNAME@$SERVER 'cat >> .ssh/authorized_keys' | cat ~/.ssh/id_rsa.pub | ssh $USERNAME@$SERVER 'cat >> .ssh/authorized_keys' | ||
</syntaxhighlight> | |||
Benutzer Wechseln | |||
<syntaxhighlight lang="bash"> | |||
sudo su reto | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Version vom 22. April 2015, 18:09 Uhr
als erstes muss auf dem Server folgende Ordner und Datei erstellet werden.
mkdir -p .ssh
cat > .ssh/authorized_keys
chmod go-w ~
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
Auf DAN ausführen:
cat ~/.ssh/id_rsa.pub | ssh $USERNAME@$SERVER 'cat >> .ssh/authorized_keys'
Benutzer Wechseln
sudo su reto