cloud init machines and ansible.

jhmc93

Member
Feb 22, 2022
177
1
23
31
Hello is I have uploaded my ssh keys to my cloud init machines and i'm able to access my cloud init machines off my windows, But I'm trying to ssh for ansible from one of my cloud init machines into the other cloud init machine but i'm keep getting publckey error can someone else
 
Hello is I have uploaded my ssh keys to my cloud init machines and i'm able to access my cloud init machines off my windows
Unless you used custom configuration, only the Public part is uploaded.
But I'm trying to ssh for ansible from one of my cloud init machines into the other cloud init machine
To be able to SSH from host A to host B you need to have Private key on host A and public key on host B. In case of Windows/Linux - Windows, presumably, has the private key. In case of two cloud images, my guess is, they only have public keys.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Unless you used custom configuration, only the Public part is uploaded.

To be able to SSH from host A to host B you need to have Private key on host A and public key on host B. In case of Windows/Linux - Windows, presumably, has the private key. In case of two cloud images, my guess is, they only have public keys.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
So I’m running two cloud init Ubuntu VM’s, to ssh from VM 1 to VM 2, do I need to have the private key of VM 1 on VM 2? As I’ve already got my windows ssh key imported on VM 1 & 2 so connecting to ssh through my windows works fine. Its just I want to ssh into vm 2 from vm 1, I hope that makes sense
 
So I’m running two cloud init Ubuntu VM’s, to ssh from VM 1 to VM 2, do I need to have the private key of VM 1 on VM 2? As I’ve already got my windows ssh key imported on VM 1 & 2 so connecting to ssh through my windows works fine. Its just I want to ssh into vm 2 from vm 1, I hope that makes sense
Depending on your Windows client you may be able to use SSH agent. This will allow you to avoid spreading the private key around. Without it, you need to have private key part of the pair on whichever host you are ssh'ing from.

None of this is part of PVE installation and Configuration, just basic SSH management with multiple articles describing it available on the Net.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
Depending on your Windows client you may be able to use SSH agent. This will allow you to avoid spreading the private key around. Without it, you need to have private key part of the pair on whichever host you are ssh'ing from.

None of this is part of PVE installation and Configuration, just basic SSH management with multiple articles describing it available on the Net.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
So how would I go about ssh from Ubuntu cloud vm 1 into Ubuntu cloud 2? , I’m still quite new to cloud init and that’s all I need help with my ssh from windows into both cloud VMs is fine just vm to vm
 
So how would I go about ssh from Ubuntu cloud vm 1 into Ubuntu cloud 2? , I’m still quite new to cloud init and that’s all I need help with my ssh from windows into both cloud VMs is fine just vm to vm
Securely: use SSH Agent
Insecurely: copy private SSH key to VM1
https://superuser.com/questions/878943/how-to-use-putty-for-forwarding-keys

Perhaps few of these can help:
https://www.youtube.com/watch?v=y2SWzw9D4RA
https://www.youtube.com/watch?v=TYyTXxVWOYA
https://www.youtube.com/watch?v=JTDhV43EKsM
https://www.youtube.com/watch?v=p4Jhf729jgg

PS your inquiry has very little to do with Cloud Init


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
Securely: use SSH Agent
Insecurely: copy private SSH key to VM1
https://superuser.com/questions/878943/how-to-use-putty-for-forwarding-keys

Perhaps few of these can help:
https://www.youtube.com/watch?v=y2SWzw9D4RA
https://www.youtube.com/watch?v=TYyTXxVWOYA
https://www.youtube.com/watch?v=JTDhV43EKsM
https://www.youtube.com/watch?v=p4Jhf729jgg

PS your inquiry has very little to do with Cloud Init


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox

So use ssh agent on windows or the Linux side?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!