Question: In my project, I have to install some package remotely. If I have to login in debian, I say: 

```
$ ssh root@remotehostname
root@remotehostname's password: 

```

it logs in successfully. 

I have login in **ubuntu** in directly using

```
 $ root@remotehostname
 root@remotehostname's password:

```

it is throw error message in

```
Permission denied, please try again.

```

How to solve this problem?

Answer: 
check the `/etc/ssh/sshd_config` whether the configure `PermitRootLogin yes` below `# Authentication:`. If not `yes`, it doesn't permit login as root.

you can change it to `yes`.

Then, restart ssh service to apply the changes:
`sudo service sshd restart`
I think the only time I ever tired to log in as root was the first time I used AWS EC2 and I tried to long in as root because I knew it existed. The user name ec2-user.