-3

I create an user with root prevelages in my server. Now i cannot login into the server as root through ssh. Also I cannot access the vi editor through the new user login.

2
  • Please help me before you going to down vote. Jun 19, 2013 at 8:29
  • 1
    Server Fault is a site for system and network administrators needing expert answers related to managing computer systems in a professional capacity. Please read this page before posting again: serverfault.com/help/on-topic Jun 19, 2013 at 8:42

3 Answers 3

3

Now i cannot login into the server as root through ssh.

This is the default for CentOS. Edit the /etc/ssh/sshd_config and remove the comment from the "PermitRootLogin yes" directive. Restart the sshd server. Remember, enabling root login is a bad idea, unless you know what you are doing.

6
  • Error reading /etc/ssh/sshd_config: Permission denied ] this is the error when i try to open sshd_config Jun 19, 2013 at 8:39
  • 1
    I think you need a "Quick and Dirty Guide To Basic Linux Administration". Google around, there are hundreds of books, howto, FAQ, and so on.
    – AndrewQ
    Jun 19, 2013 at 8:44
  • could you help me how to login as root user again ? now the access denied. i neet to login into yhe system as root for some modifications. thats why i asked? Jun 19, 2013 at 8:46
  • I manage 10 remote CentOS installations in this way: ssh using a standard user (non-root). Then I do a "su -" command. It will ask you the password for the root user. If the password is valid, you become root.
    – AndrewQ
    Jun 19, 2013 at 8:48
  • 2
    Not to be rude, but since you do not know the bare basics of systems administrations, I would strongly advise against installing PHPmyadmin right now. You need to first learn the basics. Otherwise you can expect to have your system compromised in short order.
    – Jenny D
    Jun 19, 2013 at 9:09
1

You probably have PermitRootLogin no in your sshd configuration.

10
  • no i didn't. still its #PermitRootLogin Yes Jun 19, 2013 at 8:34
  • 1
    Remove the leading '#'
    – AndrewQ
    Jun 19, 2013 at 8:35
  • it is commented out - still remote root logins are a bad idea
    – thanasisk
    Jun 19, 2013 at 8:36
  • Error reading /etc/ssh/sshd_config: Permission denied ] this is the error when i try to open sshd_config Jun 19, 2013 at 8:39
  • 2
    @ManeeshMohanachandran - it sounds like you need to read a Linux 101 webpage to at least learn the basics of the OS first Jun 19, 2013 at 8:41
0

Terribly worded question, shows no research or attempt to help yourself - thoroughly deserves closing immediately.

That said have you looked in /etc/ssh/sshd_config for a line saying "PermitRootLogin no", if it's there then change it to 'yes' and do a "/etc/init.d/sshd restart" to make the change come into effect.

Oh and don't post again until you've read our FAQ, instead of skipping it, and therefore know what we expect of question askers ok.

2
  • 1
    i didn't change that part still its #PermitRootLogin Yes Jun 19, 2013 at 8:35
  • The # means that the line is commented out, i.e. not in effect.
    – Jenny D
    Jun 19, 2013 at 8:46

Not the answer you're looking for? Browse other questions tagged .