Configure New SSH Keys on Apstra Server
You can replace SSH host keys on new or existing Apstra server VMs.
-
SSH into the Apstra server as user admin. (
ssh admin@<apstra-server-ip>
where<apstra-server-ip>
is the IP address of the Astra server.) -
Run the command
sudo rm /etc/ssh/ssh_host*
to remove SSH host keys. -
Run the command
sudo dpkg-reconfigure openssh-server
to configure new SSH host keys.admin@aos-server:~$ sudo dpkg-reconfigure openssh-server Creating SSH2 RSA key; this may take some time ... 2048 SHA256:EWRFcs4V6BmOILR3T2Psxng1uE0qXQ/z9IKkXrnLpJs root@aos-server (RSA) Creating SSH2 ECDSA key; this may take some time ... 256 SHA256:THaXEia8VW6Jfw6OBXFegu1Cav0zcGSVOy9RkNOPxf4 root@aos-server (ECDSA) Creating SSH2 ED25519 key; this may take some time ... 256 SHA256:0HOn0nnF+7oRaF5HggI4vWeyxT+UNsHcbvNpBJdaKhQ root@aos-server (ED25519) admin@aos-server:~$ sudo dpkg-reconfigure openssh-server
-
To restart the SSH server process, run the command
sudo systemctl restart ssh
.