1

I want to ask you for help. I installed Ubuntu on my old pc and when I want connect by putty I login as: root and need password. I changed password in Ubuntu terminal by commands:

# sudo -i
# passwd

And still I can't connect by putty (root) Its still write when I put password: Access denied. I watched lot of videos and nothing worked.

I have Ubuntu 18.04.2 LTS

Please help!

Thanks

Danster
  • 11

1 Answers1

1

Notice that to change the root password, you had to sudo first?

By default, Ubuntu is configured in a way so that you can "sudo" and become root user to do things, but you cannot log on as root directly. This is a security issue as the sudo will track who logged on, and it can also restrict what is allowed to be done.

If using putty, when you use "ssh" and try to connect to your old PC, you must use a non-root login. Generally, you would log in using a regular user account, and then once at a shell prompt, just issue the sudo command to do those few commands that you feel the need to run as root user.

There is indeed a way to override this restriction, which usually involves making changes to the sshd_config file. But there is normally no reason for you to allow root logins when the sudo su - root can accomplish the same thing and with more security/accountability.

S. Nixon
  • 472