[SOLVED] How to ssh into VM?

Boyd911

Member
Apr 8, 2023
38
2
8
Am a newbie and have proxmox running since a day. My proxmox networking seems fine - i can ssh into it and web gui is working.

I really don’t get how VM networking works - does the VM get a different IP?

How do I ssh into a VM from my local network? Let’s say I want to access vm 101.

pct enter 101 returns Configuration file 'nodes/pve01/lxc/101.conf' does not exist
 
I really don’t get how VM networking works - does the VM get a different IP?
PVE won't manage your guest OS. You will have to configure the guest OS yourself. And yes, you want to give your VM isn't own IP.

How do I ssh into a VM from my local network? Let’s say I want to access vm 101.
You will have to setup a SSH server inside your VM.
pct enter 101 returns Configuration file 'nodes/pve01/lxc/101.conf' does not exist
pct is for LXCs only. VMs use the qm command.
 
Sorry, thx for the help. I looked at the wrong thing - the VM has actually a different ip 192.168.2.78

But trying to ssh into it - will result in " ssh: connect to host 192.168.2.78 port 22: Operation timed out"

Is that a firewall issue at the VM level?
 
Sorry, thx for the help. I looked at the wrong thing - the VM has actually a different ip 192.168.2.78

But trying to ssh into it - will result in " ssh: connect to host 192.168.2.78 port 22: Operation timed out"

Is that a firewall issue at the VM level?
Only if you enabled the firewall at datacenter level which comes disabled by default, meaning there is no enabled firewall for VMs or the host, even if you enable the firewall at VMs or host level.

I would first make sure that your SSH server inside your VM is up and running and listening on the correct interface.
 
Thanks for your help. I rebooted PVE and it worked - am so happy.

I can ssh into PVE and into VM’s now.
 
Just wanted to clarify, I'm a new user to Linux and I ran into an issue with not being able to SSH into my Primary Docker Machine (Which is Ubuntu Server Live) when I was able to before. Turns out, I must have turned on the UFW Firewall setting at some point and for a VERY long while, I spent time trying to figure out why my ports were listening for various things I had listening on them like SSH, but nothing was capable of going through them. Proxmox and really, I think anything that makes virtual environments, isn't capable of recognizing a Firewall, making rules from within an isolated environment.
Instead of being mad and fuming for the next couple days, I decided, I'll take it as a lesson and drop my wisdom off here.

TL;DR
Make sure UFW isn't enabled or at the very least, ensure your desired ports are open on it. They pop up as listening whenever you
'sudo netstat -tulnp | grep ssh' and Proxmox can't recognize it on it's level. It was a sneaky error.
 

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!