Les étapes à suivre :
(config)# hostname Ratio
Ratio(config)# ip domain-name minet.net
Ratio(config)# crypto key generate rsa
The name for the keys will be: Rl.span.com
% The key modulus size is 2048 bits
% Generating 2048 bit RSA keys, keys will be non-exportable...[OK]
Ratio(config)# ip ssh version 2
Ratio(config)# username ratio secret .Frauduleux123!
Ratio(config)# line vty 0 15
Ratio(config-line)# login local #pour utiliser le compte local en SSH.
Ratio(config-line)# transport input ssh
Ratio(config)# interface vlan 1
Ratio(config-if)# ip address X.X.X.X Y.Y.Y.Y
Ratio(config-if)# no shutdown
Prochaine étape ?
Configurer votre ordinateur pour être dans le même réseau que l'interface de management.
ssh votreuser@ipduswitch
"Ça marche pas tocard"
Ouais carrément, faut rajouter ça :
ssh -oHostKeyAlgorithms=+ssh-rsa -oKexAlgorithms="diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1" -oCiphers="aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc" user@ip
Ça veut dire quoi ?
man ssh_config
Bonne lecture .
"Ça marche toujours pas + j'ai Fedora 36+"
Depuis la version 36, Fedora limite par défaut les accès de la clé ssh ce qui peut bloquer la connexion (message du type "Unable to negotiate with x.x.x.x port x : no matching host key type found. Their offer: ssh-rsa"
La solution c'est d'élargir l'accès à la clé avec la commande suivante.
sudo update-crypto-policies --set LEGACY
Et pour annuler ces changements :
sudo update-crypto-policies --set DEFAULT
Si jamais ça marche pas direct pensez à reboot puis réessayez !