0

When I try to ssh into my friends computer in the same LAN with his host-name and IP I am able to login successfully. But when I try to login using the root user password it shows me the following error. What could be the possible reason?

ssh [email protected]
[email protected]'s password: 
Permission denied, please try again.
[email protected]'s password: 
Permission denied, please try again.
[email protected]'s password: 
Permission denied (publickey,password).
6
  • SSH default configuration don't allow to log as root.
    – Pyrophorus
    Sep 15, 2014 at 11:55
  • Then how can i change the configuration? Sep 15, 2014 at 12:01
  • In the host /etc/ssh/sshd_config add (or modify) the line: PermitRootLogin yes
    – Pyrophorus
    Sep 15, 2014 at 12:05
  • Thanks for that. I wish to know whether there exists any other options available to ssh without enabling this thing in sshd_config Sep 15, 2014 at 12:37
  • Well, maybe there is one I know not, but it would be really strange (from a security point of view), if you could be able to login as root on some computer which don't allow it explicitly. Anyway, why logging as root ? If you use an account member of the sudoers group, you will be able to do anything you could do as root.
    – Pyrophorus
    Sep 15, 2014 at 15:21

2 Answers 2

0

There are three ways to configure SSH. Al three ways have the same options wich will be passed as arguments to SSH.

1-System wide configuration file: /etc/ssh/ssh_config

2-Personal configuration file: ~/.ssh/config

3-Command line arguments

1
  • Yes, but you can't setup the login as root permission from the client side which obviously what's OP wants.
    – Pyrophorus
    Sep 15, 2014 at 15:31
0

You need to check if the SSH root connection is activated in the remote laptop !

Open the file /etc/ssh/sshd_config

vim /etc/ssh/sshd_config

Turn the PermitRootLogin option from No to Yes

PermitRootLogin Yes

Reload the ssh service

/etc/init.d/sshd reload

Hope it helps ...

You must log in to answer this question.

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