[SOLVED] Proxmox Login issue (possibly due to SSH config)

SumoSumir

New Member
Dec 24, 2023
5
0
1
Hello,
I have a rather unusual issue.
My proxmox servers is accepting ssh connections and allows me to login, but then it immediately closes the connection. I can't even access the server directly using my proxmox host machine as that too prompt's me for my username and password for its ssh login. When I use the web-ui the shell fails with an error code of 1006.

In summary,
Methods tried:
1. Direct access on host machine
2. ssh through several machines
3. Access through Web-ui
4. ssh -t "<put your command here>"

Potential Solutions am looking at:
1. deleting
/etc/pve/priv/known_hosts
/etc/ssh/ssh_known_hosts
/root/.ssh/known_hosts
looking into attaching proxmox storage to VM (I can ssh into the VM's)
2. ssh from one vm to the proxmox pve i.e host

Requesting your help for the above solutions or any other I may have missed


(Screenshot of an attempted ssh from another machine)
Screenshot 2023-12-24 at 11.45.26 PM.png
 
Last edited:
The screenshot looks like it logged in and immediately exited. Did you change roots shell perhaps? Is the root disk full? Can you boot into rescue mode?
I didn't change shells, disk has plenty capacity, and no - I get stuck on the same login screen
 
Last edited:
Not clear to me if you tried logging in on the physical console with a monitor. That does not use ssh in any way. If this is a server IPMI or similar would do as well.
Ideally it shouldn't but when I use the physical host machine it prompts me for the initial username and password - then it replicates the same process as in the screenshot. never allowing me a chance to type any command.
 
Last edited:
Ideally it shouldn't but when I use the physical host machine it prompts me for the initial username and password - then it replicates the same process as in the screenshot. never allowing me a chance to type any command.
Console login with monitor & keyboard does not use SSH. Therefore this is not an SSH problem it is a general login problem. Maybe your login shell was changed to something non-existent or your .bashrc or .profile (leading dot means hidden file) has an exit or logout in it or the PAM configuration got messed up or something like that.

If you can't boot in rescue mode I would boot from a live Linux CD or the PVE installer in rescue mode. Then you can mount the rootfs somewhere and verify /root/.bashrc, /etc/passwd, /etc/shadow, /etc/pam.d/* and so on.

ETA: Would not recommend trying to mount PVE rootfs to a VM. That will not be a happy situation.
 
Last edited:
Ideally it shouldn't but when I use the physical host machine it prompt me for the initial username and password - then it replicates the same process as in the screenshot. never allowing me a chance to type any command

Console login with monitor & keyboard does not use SSH. Therefore this is not an SSH problem it is a general login problem. Maybe your login shell was changed to something non-existent or your .bashrc or .profile (leading dot means hidden file) has an exit or logout in it or the PAM configuration got messed up or something like that.

If you can't boot in rescue mode I would boot from a live Linux CD or the PVE installer in rescue mode. Then you can mount the rootfs somewhere and verify /root/.bashrc, /etc/passwd, /etc/shadow, /etc/pam.d/* and so on.

ETA: Would not recommend trying to mount PVE rootfs to a VM. That will not be a happy situation.
Great I shall try this and revert back
Thank you for your help
 
Console login with monitor & keyboard does not use SSH. Therefore this is not an SSH problem it is a general login problem. Maybe your login shell was changed to something non-existent or your .bashrc or .profile (leading dot means hidden file) has an exit or logout in it or the PAM configuration got messed up or something like that.

If you can't boot in rescue mode I would boot from a live Linux CD or the PVE installer in rescue mode. Then you can mount the rootfs somewhere and verify /root/.bashrc, /etc/passwd, /etc/shadow, /etc/pam.d/* and so on.

ETA: Would not recommend trying to mount PVE rootfs to a VM. That will not be a happy situation.
Hey
turns out the issue was caused to an invalid update - one of my repo's had an incorrect 'suite' value.
As soon as I fixed it and performed 'update' and 'upgrade' through the webui - proxmox fixed the incorrect initramfs & grub.
Thanks for all the help

Leaving this post up in case anyone faces a similar issue
 
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!