ssh to proxmox console...

darekpawel

Active Member
Dec 3, 2019
31
2
28
59
How can I access 'proxmox' console from another PC via ssh?
I'm trying some advice - but looks like this is not working...
Something must be enabled on 'proxmox' ?

Code:
C:\>ssh root@192.168.1.5
ssh: connect to host 192.168.1.5 port 22: Connection refused
 
Yes, the firewall is 'ON', but none rule is defined... I've never touched it...
Should I define 'allowed' 'all traffic' for port '22'...?
 
Can you browse your node over https://yournode:8006 from Windows system or ping it?

Should I define 'allowed' 'all traffic' for port '22'...?
no, not need that.

also check if ssh port is open on your node by doing the following command
ss -a -4 | grep ssh
 
How can I access 'proxmox' console from another PC via ssh?
I'm trying some advice - but looks like this is not working...
Something must be enabled on 'proxmox' ?

Code:
C:\>ssh root@192.168.1.5
ssh: connect to host 192.168.1.5 port 22: Connection refused
Root is by default prevented from logging in by SSH.

edit /etc/ssh/sshd_config from the web console/shell.

and set PermitRootLogin yes

A better way is to add a drop-in and include it and an even better way is to set up some keys.
 
  • Like
Reactions: Holm
Followed that, then:
Code:
root@proxmox:~# service sshd restart

But still:
Code:
C:\>ssh root@192.168.1.5
ssh: connect to host 192.168.1.5 port 22: Connection refused

Port '22' is open.
Code:
Oct 14 16:36:09 proxmox systemd[1]: Started OpenBSD Secure Shell server.
Oct 14 16:36:09 proxmox sshd[7646]: Server listening on 0.0.0.0 port 22.
Oct 14 16:36:09 proxmox sshd[7646]: Server listening on :: port 22.
 
Last edited:
  • Like
Reactions: MyjintuGeeca
Code:
# nc 192.168.1.1.5 22
SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2
 
Last edited:
Some update (sorry forgot to mention that; just now realized) the 'ssh' start session problem I have when trying from 'Windows10'.
From any 'Linux' it works.
 
please try to telnet from Windows machine to Proxmox VE address over ssh port telnet 192.168.1.5 22 if you get response like
SSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2

you can connect over ssh, but if you get connection refused then you need to check Windows firewall or any protection program
 
To help those with the same problem as above, please check whether you have enabled cluster. SSH to proxmox hypervisor will not work as cluster is using the ssh to connect to other nodes.
 
To help those with the same problem as above, please check whether you have enabled cluster. SSH to proxmox hypervisor will not work as cluster is using the ssh to connect to other nodes.

For me the following changes in /etc/ssh/sshd_config solved the problem

Port 22 -> remove the #
#AddressFamily any
ListenAddress 0.0.0.0 ->remove the # and replace 0.0.0.0 with your proxmox computer ip address
#ListenAddress ::
 
Using Proxmox VE 8.0.3 I've had the same problem as described. I've changed /etc/ssh/sshd_config

Port 22 -> remove the #
#AddressFamily any
ListenAddress 0.0.0.0 ->remove the # and replace 0.0.0.0 with your proxmox computer ip address
#ListenAddress ::

and reload the sshd service with systemctl reload sshd but still couldn't login per ssh (alas I'm connecting from Linux not from Windows).

My problem was that I already have a ssh-key and ssh was trying to use them. I needed to disable them and only attempt to connect by password with the following option:

ssh -o PubkeyAuthentication=no -o PreferredAuthentications=password root@<ip-or-hostname-of-proxmox-host>

I have then changed back /etc/ssh/sshd_config and reloaded the sshd service systemctl reload sshd and it was still working.

Addendum:
To copy my key-files I then did ssh-copy-id -o PubkeyAuthentication=no -o PreferredAuthentications=password root@<ip-or-hostname-of-proxmox-host>

Now I can ssh into the system without any options: ssh root@<ip-or-hostname-of-proxmox-host>
 
Last edited:

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!