How to connect to a virtual machine via SSH from Windows 10 Command Prompt
Requirements
The private and public keys were created and saved on the local disk of your computer. (How to create key pair in OpenStack Dashboard)
During the virtual machine creation procedure, the generated key was attached. (How to create new Linux VM in OpenStack Dashboard Horizon)
A floating IP was assigned to your VM. (How to Add or Remove Floating IP’s to your VM)
Check in “Installed features” if the OpenSSH client is installed, if not click Add a feature, search for OpenSSH client and install it.
Step 1 Go to the folder containing your SSH keys
Run the Command Prompt and change the current folder to the folder where you store your keys.
For example:
cd c:\Users\wikit\sshkeys
Step 2 Connect to your VM using SSH
If the name of your key is id_rsa and the floating IP of your virtual machine is 64.225.129.203, type the following command:
ssh -i id_rsa [email protected]
If the text before the cursor changed to eouser@test (assuming the name of your virtual machine is test), the connection was successfully established. Before that, you may get the message that the authenticity of the host can’t be established, followed by this question:
Are you sure you want to continue connecting (yes/no/[fingerprint])?
If you got that message, it typically means that your computer has never connected to your VM via SSH before and that you should confirm that you are willing to connect by typing “yes” and pressing Enter.
You should now be able to issue commands to your VM:
If you can’t connect to your virtual machine, check that you have the Security Group enabled to connect to SSH port: How to use Security Groups in Horizon