AOS 8 - SSH Key installieren: Unterschied zwischen den Versionen

Aus QBWiki
Zur Navigation springenZur Suche springen
Zeile 17: Zeile 17:
  
 
scp ~/.ssh/id_rsa.pub <user>@<device>:/flash/system/remote_user_key_rsa.pub
 
scp ~/.ssh/id_rsa.pub <user>@<device>:/flash/system/remote_user_key_rsa.pub
 +
# scp ~/.ssh/id_rsa.pub sup@172.30.100.17:/flash/system/padi_10.0.2.93_rsa.pub
 
</syntaxhighlight>
 
</syntaxhighlight>
  
Zeile 28: Zeile 29:
  
 
installsshkey <user> /flash/system/remote_user_key_rsa.pub
 
installsshkey <user> /flash/system/remote_user_key_rsa.pub
 +
# installsshkey sup /flash/system/padi_10.0.2.93_rsa.pub
 
# Installed new SSH Key.
 
# Installed new SSH Key.
  
Zeile 34: Zeile 36:
  
 
===Login===
 
===Login===
 +
 +
ssh -i ~/.ssh/id_rsa <user>@<device>
 +
# ssh -i ~/.ssh/id_rsa sup@172.30.100.17
 +
 +
 +
===SSH Key entfernen===
 +
 +
<syntaxhighlight lang="bash" line="1">
 +
removesshkey <user> <remote_user>@<remote_ip>
 +
# removesshkey sup padi@172.30.100.17
 +
</syntaxhighlight>

Version vom 6. März 2019, 10:32 Uhr


SSH Key erstellen (Lokale Maschine)

 1 # SSH Key unbedingt mit einem sehr sicherem Passwort anlegen.
 2 # Sonst kann ein potenzieller kompromittierter Key keinen
 3 # weiteren Schaden anrichten.
 4 
 5 cd ~/.ssh
 6 # Optional für jeden Switch einen eigenen Key. Oder pro "Gruppe?". Mit -C ein Kommentar angeben, z.B.
 7 # -C remote_ssh_user@device. Den Keynamen entsprechend anpassen. (Empfehlung in der Alcatel Dokumentation)
 8 ssh-keygen -t rsa -b 4096 -qf id_rsa
 9 # Enter passphrase (empty for no passphrase): For!Example_a_Password_22LikeThis;
10 # <--- Mindestens 9 Zeichen + Groß-, Kleinbuchstaben, Sonderzeichen und Ziffern ---->
11 
12 scp ~/.ssh/id_rsa.pub <user>@<device>:/flash/system/remote_user_key_rsa.pub
13 # scp ~/.ssh/id_rsa.pub sup@172.30.100.17:/flash/system/padi_10.0.2.93_rsa.pub


Switch vorbereiten und SSH Key installieren

1 aaa authentication ssh local
2 # aaa authentication default local (schaltet ftp, http, snmp, telnet ein)
3 
4 installsshkey <user> /flash/system/remote_user_key_rsa.pub
5 # installsshkey sup /flash/system/padi_10.0.2.93_rsa.pub
6 # Installed new SSH Key.


Login

ssh -i ~/.ssh/id_rsa <user>@<device>

  1. ssh -i ~/.ssh/id_rsa sup@172.30.100.17


SSH Key entfernen

1 removesshkey <user> <remote_user>@<remote_ip>
2 # removesshkey sup padi@172.30.100.17