• 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

Question How do I change the '$' prefix to a '#', when using SSH?

Craig1986

Basic Pleskian
I would like to run the following command via SSH:

# plesk bin extension --disable google-authenticator

I am using PuTTY, where the above command is outputting the following:

plesk: command not found

I am assuming this is because the command line has a '$' prefix, which I cannot modify. Is anyone able to advise on what I need to do, in order to replace this '$' with the required '#'; so that I can run the above command?
 
The "#" indicates that you are logged in as "root". Other users have the "$" as a prompt. You need to elevate your user privileges to "root" either with a preceding "sudo" for each command or - better - a single "su", like
# su
 
That's not the issue. As Peter said, # means root - but if you're accessing the CLI as a normal user, the plesk cli will throw an error at least
 
Thanks for letting me know that '#' refers to being logged in as 'root', whilst '$' refers to other users.

I have had to place my VPS into 'Rescue Mode', where I have a set of temporary root log in credentials.

Here is what I see, when logged in:
[RESCUE] root@rescue:~ $
I have tried the various commands to elevate the privilege but I am simply returned to the above entry.
 
I have no idea why you would do that.

Did you read Peter's post? You can just elevate your access with sudo, su, or a combination of both ("sudo su").

The error you're getting has nothing to do with root/non root and the $ and #.

BTW, you're already root.

[RESCUE] root@rescue:~ $
 
I have no idea why you would do that.

Did you read Peter's post? You can just elevate your access with sudo, su, or a combination of both ("sudo su").

The error you're getting has nothing to do with root/non root and the $ and #.

BTW, you're already root.
At present, I am unable to access the Plesk Dashboard due to losing access to the Google Authentication Codes that are helping to protect the login page. Simply, the Google Authenticator App stopped working on my phone. Furthermore, I had disabled SSH Access for all Users (root included).

This is why I am having to place my VPS into Rescue Mode. My provider assured me that I would still be able to gain root access, despite having disabled its access out of Rescue Mode.

I just need to disable the Google Authenticator App, in order to be able to log back into the Plesk Dashboard again. I just cannot get these Commands to work. I have tried the following variants but to no success ...
[RESCUE] root@rescue:~ $ plesk bin extension --disable google-authenticator
[RESCUE] root@rescue:~ $ su plesk bin extension --disable google-authenticator
[RESCUE] root@rescue:~ $ su sudo plesk bin extension --disable google-authenticator
[RESCUE] root@rescue:~ $ sudo plesk bin extension --disable google-authenticator
I have also tried the above variations with the '#' but with no success neither.

I explained to my VPS supplier that I had initially disabled root access via SSH but was assured that this would not be a problem as this would be bypassed in Rescue Mode. I checked, by running the below command it is does say that the above root credential is permitted. Though my usual root credential does have the VPS name in it rather than 'rescue'.
nano /etc/ssh/sshd_config
I am a little confused as if I am logged in as root, how am I outputting the '$' rather than '#'? A previous answer states that '#' indicates that I would be logged in as root.
 
At present, I am unable to access the Plesk Dashboard due to losing access to the Google Authentication Codes that are helping to protect the login page. Simply, the Google Authenticator App stopped working on my phone. Furthermore, I had disabled SSH Access for all Users (root included).

This is why I am having to place my VPS into Rescue Mode. My provider assured me that I would still be able to gain root access, despite having disabled its access out of Rescue Mode.

I just need to disable the Google Authenticator App, in order to be able to log back into the Plesk Dashboard again. I just cannot get these Commands to work. I have tried the following variants but to no success ...

I have also tried the above variations with the '#' but with no success neither.

I explained to my VPS supplier that I had initially disabled root access via SSH but was assured that this would not be a problem as this would be bypassed in Rescue Mode. I checked, by running the below command it is does say that the above root credential is permitted. Though my usual root credential does have the VPS name in it rather than 'rescue'.

I am a little confused as if I am logged in as root, how am I outputting the '$' rather than '#'? A previous answer states that '#' indicates that I would be logged in as root.
You are root. The Plesk cli isn't being recognized because Plesk isn't installed in your rescue OS. If I were you, I'd simply enable root ssh on the main OS from rescue OS, login to the main OS, and run Plesk. In theory, you can locate the plesk cli binary and run that, I've never tried that before, and I don't know if that will work.

You may need to mount your main OS partition.

You can do that via lsblk (locate device) mount /device /folder. Your OS files will be mounted on /folder. From there, you can modify sshd_config. Ie,
nano /folder/etc/ssh/sshd_config
 
You are root. The Plesk cli isn't being recognized because Plesk isn't installed in your rescue OS. If I were you, I'd simply enable root ssh on the main OS from rescue OS, login to the main OS, and run Plesk. In theory, you can locate the plesk cli binary and run that, I've never tried that before, and I don't know if that will work.

You may need to mount your main OS partition.

You can do that via lsblk (locate device) mount /device /folder. Your OS files will be mounted on /folder. From there, you can modify sshd_config. Ie,
My Rescue Mode automated email states ...
Your VPS's tree structure has mounted into '/xyz'.
I have tried both the following:
nano /xyz/etc/ssh/sshd_config
nano /etc/ssh/sshd_config/xyz
Both return the following:
[ Directory '/xyz/etc/ssh' does not exist ]
My provider states that they are unable to assist further than advising to access the 'sshd_config' file and to change the root access options.

Apologies if I am overlooking something simple here.
 
Back
Top