What is the password for ``ssh root@localhost``?

ssh root@localhost uses the same password for root. It looks like you have not set root password. To do that log in as root using sudo -s then use passwd command to set root password.

After that you must be able to ssh as root


Login as a normal user and use sudo -i to drop to a root shell.

You should not use the root account or change it's password for the matter.


If you decide to use the root account.

Disable the ability to log in over ssh with root if ssh is exposed to internet. Instead login as a user, and su to root.

This will make sure to prevent brute force attacks against your computer. Since its harder to guess both the user and password. Knowing the username one would only have to brute force the password

changing the line:

PermitRootLogin yes

under /etc/ssh/sshd_config

to

PermitRootLogin no

and run:

service sshd restart

to reload the configuration.

Tags:

Ssh

Root