Cannot access VM via the console if I change the SSH port.

newbprox

New Member
Oct 14, 2021
4
0
1
54
Hello,
I changed the ssh port of my vm and now the console cannot connect to the VM anymore through the proxmox web gui. Is there a way to fix this besides reverting to port 22?
 
the ssh port inside the vm has no relation to the browser console at all... or what exactly do you mean?
can you post the vm config ? (qm config ID)
 
Thank you for your help. Here is the config ID

boot: order=scsi0;ide2;net0
cores: 8
ide2: local:iso/gparted-live-1.3.1-1-amd64.iso,media=cdrom,size=396M
memory: 32768
name: ubuntudocker
net0: virtio=DE:E1:32:D5:09:F7,bridge=vmbr0,firewall=1
numa: 0
onboot: 1
ostype: l26
scsi0: local-lvm:vm-104-disk-0,discard=on,size=500G
scsihw: virtio-scsi-pci
smbios1: uuid=f4277bf6-4e33-46f4-91e0-8d9be5e78feb
sockets: 2
vmgenid: cb28fed5-8928-45d8-aa43-64ade88f5d0b


Let me give more context. In my proxmox cluster I changed all my VMs and Nodes to key based authentication only and changed the port from 22 to a different one. Now since I did that, I cannot use the novnc console (the built in one on the proxmox console) to access the VM's anymore....and I can only access the Node console if I am at the same ip address (gui). If I try to access node 2's console from node 1's ip web gui, it says "ssh: connect to host 192.168.1.30 port 22: Connection refused" I appreciate your help. I LOVE proxmox and think it is wonderful.
 
Let me give more context. In my proxmox cluster I changed all my VMs and Nodes to key based authentication only and changed the port from 22 to a different one. Now since I did that, I cannot use the novnc console (the built in one on the proxmox console) to access the VM's anymore....and I can only access the Node console if I am at the same ip address (gui). If I try to access node 2's console from node 1's ip web gui, it says "ssh: connect to host 192.168.1.30 port 22: Connection refused" I appreciate your help. I LOVE proxmox and think it is wonderful.
ok that does it make it clearer

if you use a non-standard port for ssh, you also have to edit the '/etc/ssh/ssh_config' (not sshd_config) to use the other port. this tells the ssh client which port to use by default
you can ofc also limit it to the pve hosts, just check the man page ('man ssh_config') for how to do that
 
Exactly what I was looking for. Thank you! I looked up 0FC but I’m not sure I quite understand. When I search ofc and ssh I get random references towards obfuscating ssh. Am I on the correct track?
 

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!