Restoring access to VM
The credentials for connecting and managing the virtual machine must be stored in a secure location to avoid the risk of losing access and information in the virtual machine.
However, if the credentials have been lost, there are several ways to restore access to the server.
User password recovery is performed regardless of the installed operating system family of the instance.
To reset your password, you need to go to the information about the virtual machine in the list of instances of the "Cloud Computing" service.
If you have a user password, you can also replenish the lost key pair for your Linux instance.
To restore access, you need to add a new key pair using the CLI and VNC console:
- Create a new key pair in the project using the Openstack CLI and save it locally:
$ openstack keypair create --private-key <filename_and_location> <keyname>
- Copy the contents of the public key to a local file
$ openstack keypair show --public-key >> <file_path>
- Upload the created file to any external resource or cloud
- Save the file to the virtual machine with the command
$ wget <your_file>
- Copy the content of the new key to authorized_keys file
$ cat <your_file> >> ~ / .ssh / authorized_keys
- Check access to the instance with a new key pair
$ ssh -i <path_to_key> login @ IP_address