-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.

  • Please help me before you going to down vote. – Maneesh Mohanachandran Jun 19 '13 at 08: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: http://serverfault.com/help/on-topic – Falcon Momot Jun 19 '13 at 08:42

3 Answers3

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.

AndrewQ
  • 390
  • 3
  • 13
  • Error reading /etc/ssh/sshd_config: Permission denied ] this is the error when i try to open sshd_config – Maneesh Mohanachandran Jun 19 '13 at 08: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 '13 at 08: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? – Maneesh Mohanachandran Jun 19 '13 at 08: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 '13 at 08:48
  • i need to install phpmyadmin. but it need root login for activation. – Maneesh Mohanachandran Jun 19 '13 at 08:50
  • 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 '13 at 09:09
1

You probably have PermitRootLogin no in your sshd configuration.

thanasisk
  • 941
  • 6
  • 16
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.

Chopper3
  • 100,240
  • 9
  • 106
  • 238