Login in webinterface is ok, but not ssh

grey773

New Member
Jul 13, 2024
3
0
1
Hi all,

I have a small cluster setup at home consisting of
a) old Proxmox host, running pve7.4-18
b) new Proxmox host, running pve8.2.4
c) Raspberry Pi to establish quorum in case one of the other reboots.

I can login to both proxmox hosts with the webinterfaces. The old host is also accessible by ssh and everything works fine.

The new host however is not accessible by ssh or from the console of the webinterface. The authentication as root in ssh fails though I am using exactly the same passwords for both hosts. If I use the console of the webinterface, the login prompt dies with the last message

Last Login: <...>
Cannot execute zsh: no such file or directory[/CODE]

Ok, strange... the funny thing is, that by using the update shell of the webinterface of b) I get a regular bash shell logged in as root. zsh works just well from there on, so it is apparently not missing.

In this shell, I can successfully run passwd and make sure I set my password again

If I want to switch to bash with chsh, I end up with PAM: Authentication failure after entering my password.


I am really puzzled where the problem comes from. Have run updates and rebooted all machines, but to no avail. Anyone else encountered such a constellation?
 
Are you able to make a second linux/sudo-enabled user from that update shell, and does that one work to log in in general and then su or sudo su into root?
And from this new user, if you open the GUI-shell with it (after allowing the linux-user to log into proxmox too), you'll get a login prompt, does root work there?

Sidenote: Running mixed-version clusters at all is generally ill-advised, unless you're in the process of upgrading.
 
  • Like
Reactions: grey773
Thanks for the quick reply. Indeed, I was aiming to upgrade the whole setup to pve8 and already have migrated half of my virtual machines. Since everything was working for the past 4 months, I was not in a hurry and just noticed the problem because an automated zfs backup to machine b) stopped working (because it was using ssh with public key auth). I would migrate ASAP now, but since the new host is causing these problems, I am hesitant.

By exploiting the update console I can add a new user and give sudo rights. ssh into the machine with this user works just fine. Do you have an idea why this does not work anymore for root? I have checked my sshd config file, to make sure it contains

PermitRootLogin yes

Though, even if I attach a sceen and keyboard to the machine I can not login as root anymore
 
Looking around some, I found this post [1]. Then checking the /etc/passwd on my own system, I see the root set as using /bin/bash.
Could you check with the new sudo-user if the root user in /etc/passwd is set to root:x:0:0:root:/root:/bin/bash or something else?
If something else, try changing it back to that and seeing if that fixes things.

I'm suspecting that the update-console FORCES /bin/bash, while SSH and the GUI-Console respect the setting, which for some reason (now) causes issues for you.

[1] https://www.linode.com/community/qu...nnot-execute-binzsh-no-such-file-or-directory

EDIT: Fixed typo to not seem like a douche...
 
  • Like
Reactions: grey773
Looking around some, I found this post [1]. Then checking the /etc/passwd on my own system, I see the root set as using /bin/bash.
Could you check with the new sudo-user if the root user in /etc/passwd is set to root:x:0:0:root:/root:/bin/bash or something else?
If something else, try changing it back to that and seeing if that fixes things.
Thanks a lot! With this suggestion I was able to get rid of the problem, because the console parameter at the end was not pointing to the correct absolute path of zsh (now /usr/bin/zsh).

The conclusion is that this was not caused by proxmox itself, but rather a not update-proof customization I seem to have done a while ago. All green for migration then.
 
Glad to hear you got it working and happy updating/proxmox'ing (And having a second backup-user available using the default /bin/bash is never a bad thing, but otherwise you can probably now remove it)
 
Looking around some, I found this post [1]. Then checking the /etc/passwd on my own system, I see the root set as using /bin/bash.
Could you check with the new sudo-user if the root user in /etc/passwd is set to root:x:0:0:root:/root:/bin/bash or something else?
If something else, try changing it back to that and seeing if that fixes things.

I'm suspecting that the update-console FORCES /bin/bash, while SSH and the GUI-Console respect the setting, which for some reason (now) causes issues for you.

[1] https://www.linode.com/community/qu...nnot-execute-binzsh-no-such-file-or-directory

EDIT: Fixed typo to not seem like a douche...

This is a bit weird for me, I checked and ensured that my root user does have bin bash but still I can't login by ssh.
I am trying to log in from powershell on a windows based client. I might have to install zsh I guess?

edit: nevermind, I added a new user and put the user in sudo group then ssh works well using the new user. root for lxc is disabled for login through ssh.
 
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!