How do I ssh from one VM to another?

Knight0Light

New Member
Aug 23, 2023
6
0
1
Dear Proxmox users,
I am trying to learn ansible by setting up an ansible environment at home, but I have run into an issue, none of my proxmox hosts seem to be able to ssh into eachother. Trying to ssh with either the hostname I assigned them returns a "could not resolve hostname: Name or service not known" error.
Trying to ssh with the IP address I get from ifconfig returns a "connection to host: connection refused" error.
I have 5 hosts, including the ansible control node, and ssh-ing between them is essential to using ansible. It doesnt seem like there is any reason the ssh should break, what am I doing wrong here? I am brand new to setting up any kind of network, so I am sure I have missed something obvious.
 
Did you change any firewall rules? By default port 22 is covered by the hidden anti-lockout rules and should always be open.
Do you try to login as root? Have you done any changes to your sshd_conf?
With a default PVE installation "PermitRootLogin yes" should be set so root is allowed to login via SSH using a password (which for example wouldn't be the case with a default debian).
 
Last edited:
Did you change any firewall rules? By default port 22 is covered by the hidden anti-lockout rules and should always be open.
Do you try to login as root? Have you done any changes to your sshd_conf?
With a default PVE installation "PermitRootLogin yes" should be set so root is allowed to login via SSH using a password (which for example wouldn't be the case with a default debian).
I have not changed any firewall rules (though I wasted a good bit of time trying to figure out how after misinterpreting your answer lol).
I also have not changed my sshd_conf (no idea what that is or where to find it).
I likely used the default PVE installation, and attempting to ssh while logged in as root gives the same connection refused error.
 
I have not changed any firewall rules (though I wasted a good bit of time trying to figure out how after misinterpreting your answer lol).
I also have not changed my sshd_conf (no idea what that is or where to find it).
I likely used the default PVE installation, and attempting to ssh while logged in as root gives the same connection refused error.
I have done some more research and discovered that my VM's had their firewall's Input Policy set to DENY. I have fixed this and it is now set to ACCEPT.
I have also checked every VM and ufw's status is inactive.
I checked the ssh_config.d file on my VMs and its contents are attached. Is anything amiss in this file perhaps?
Please help, I still have no idea why I cannot ssh from one VM to another.
 

Attachments

  • Capture.PNG
    Capture.PNG
    90.4 KB · Views: 14

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!