One IP and some VMs

adolph

New Member
Aug 6, 2015
2
0
1
Hi people! I'm Adolph and I know proxmox because of a friend of mine recommended it for my work. So, I have to deal with this situation:

I have only 1 public IP in the dedicated server, and I have to run 2 VMs (for the moment) that have to run ssh (and Apache, I think, but just in one of those 2 VMs as far as I know). So, I looked for info at internet and found this 3 sites: one, two, three, which helped me to have one of the VMs running with ssh (I can connect from where I work and home).

So, as far as I understood, when I connect doing "ssh -p 10022 user@ip", I connect to one server (I guess I connect to the server the port is assigned), but is it possible to have 2 VMs running under the same port and connect to one of another depending of the user I use to do the ssh connection?

Thank you for your help! :D

PS.: I'm not a native english speaker, sorry if I wrote this too bad :(
 
Hi,
this is generally not possible and is no limitation of Proxmox.

You have to use 2 different Ports for the VMs.
 
You could use a somewhat weird workaround: Use the host's ssh, and add Match User sections with ForceCommand entries...

Assuming the guest VMs also each have an internal IP, like fc00::1 and fc00::2
Code:
Match User user1
ForceCommand ssh user1@fc00::1

Match User user2
ForceCommand ssh user2@fc00::2

(If you don't want to type in an additional password you'll have to setup ssh keys for the user's on the host to use when connecting to the guest.)
 
Thank you very much for your reply, wolfgang!I guessed when I started to see fails in login :). Blub, thank you too! I'll try it as soon as I finish my holidays!
 

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!