• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Cannot ssh as root due to error in command

chrisa44811

New Pleskian
Server operating system version
CentOS Linux 7 (Core)
Plesk version and microupdate number
18.0.47
Hello, I attempted to install nodenv as the root user to manage my node versions and somehow the installation went wrong. Now when I ssh into the machine, or even use the plesk terminal feature in the plesk admin, I get the following errors. How do I restore my root user ssh profile or not run this command. Without root I cannot do anything on the server.

This error shows after ssh.
/root/.nodenv/bin/nodenv: line 99: nodenv---version: command not found

Can I set up another sudo user so I can fix the root users file or even just remove this file so it doesn't cause me problems. I need help my server cannot be configured anymore.

-bash-4.2$ hostnamectl
Static hostname: localhost.localdomain
Icon name: computer-vm
Chassis: vm
Machine ID: 141a8b7ea56c44d4ab9536821aafeeb2
Boot ID: cfb4bcc5454b4ee2866f3de758882821
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-514.26.2.el7.x86_64
Architecture: x86-64

Plesk Obsidian Web Host Edition
Version 18.0.47 Update #5
 

Attachments

  • Screen Shot 2023-09-20 at 10.44.31 PM.png
    Screen Shot 2023-09-20 at 10.44.31 PM.png
    193.1 KB · Views: 7
You'll need to ask your datacenter for console access. They can normally attach a special device to the system through which you can work on the Linux console as if you were sitting in front of the computer. This won't need SSH.
 
Thank you Peter for your prompt response. I was able to get as you mentioned console access and was able to boot the machine in a recovery mode which allowed me to mount the disk. From there I fixed the files affected and now am able to ssh again. Once again I appreciate it Peter.
 
Back
Top