External SSH into Proxmox VMs without VPN?

naupe

Member
Apr 8, 2019
34
3
13
35
So right now, I have a working Proxmox VE 5.3 Server (installed on a Dell PowerEdge R710) with several working VMs. Proxmox and the VMs are all setup with HTTPS. Because the Server and VMs are running off a single IP from the Server, I have had to reverse proxy all of the VMs through an Nginx VM.

Using Putty, I can SSH into Proxmox via External and Internal IP Address, but the VMs I can only SSH into using their Internal IP Addresses (afterall, only 1 External IP Address, and Port 22 is assigned to Proxmox). Is there some other address I can ssh to the VMs with? Right now my R710 Server is at home, but in the future it will be moving to a Server Lab. I will obviously not be able to access the VMs via their Internal IP Addresses once they're out of my home network.

Yes, I am aware I can access these VMs via Proxmox Web Console Terminals, but these Terminals are slow and do no have copy/paste functionality. I have read elsewhere the recommendation of using VPN (in particular OpenVPN), and I've already tried to setup an OpenVPN VM and have had no luck in its setup (I find it very complicated), so I want to avoid its use.
 

oguz

Proxmox Retired Staff
Retired Staff
Nov 19, 2018
5,207
680
118
hi,

if it's only you (and/or a small group of people) accessing these vms, then openvpn is the best option if you're avoiding using the web ui. it actually shouldn't be that hard to set up. just set it up on one of the public facing ips/ports(if you NAT), and enable access to the private networks that the other vms are on.

if you want to make them somehow public (like host a website or some kind of service), then your best option might be to set up nat and port forwarding. check this article[0]

[0]: https://raymii.org/s/tutorials/Proxmox_VE_One_Public_IP.html
 

RokaKen

Active Member
Oct 11, 2018
182
50
33
USA
@naupe ,

You can trivially solve this by using the PuTTY 'remote command' feature. Just copy your session for the External Proxmox IP to new session. Edit the new session, under "SSH" in 'Remote Command' window, put ssh <Internal P of VMIDx> and save. When you launch this session it will use your Proxmox server to jump to the VM (assuming no firewall is blocking the connections).
 

naupe

Member
Apr 8, 2019
34
3
13
35
@naupe ,

You can trivially solve this by using the PuTTY 'remote command' feature. Just copy your session for the External Proxmox IP to new session. Edit the new session, under "SSH" in 'Remote Command' window, put ssh <Internal P of VMIDx> and save. When you launch this session it will use your Proxmox server to jump to the VM (assuming no firewall is blocking the connections).
You know ... I've used the SSH "Remoted command" option before with Saved Sessions in Putty, when in order to ssh to one server required I ssh to another (and I wanted to save time doing this) ... but I only ever used this feature in a completely internal server environment. I hadn't considered using it in an external server environment!

It also has just occurred to me now that I should be able to SSH into my VMs from a Proxmox Console (with Internal IP Addresses) ... that should have been obvious to me before.

I will definitely be trying this out next time I start up my Proxmox Server and Putty. Thank you RokaKen!
 

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 your own in 60 seconds.

Buy now!