I have an arm7 board running GNU/Linux, it's connected to the internet via Ethernet port. I am trying to SSH in to it as root@IPaddr but it is prompting me for a password. I am pretty sure the password was never set on it. I actually changed the sudoers file as well with :


but no use. I am able to shell in to it via serial port though without getting prompted for a password. I am a little lost.

root@mur0011:~# ls -la .ssh/
drwx------    2 root     root          4096 Nov  8 01:10 .
drwxr-xr-x   10 root     root          4096 Nov  8 01:10 ..
-rw-------    1 root     root          2347 Jun  1 21:20 authorized_keys
-rw-------    1 root     root          1675 May 31 23:19 id_rsa
-rw-r--r--    1 root     root           397 May 31 23:19 id_rsa.pub
-rw-r--r--    1 root     root           803 Jun  1 19:51 known_hosts
root@mur0011:~# uname -a
Linux mur0011 3.14.38-6UL_ga+ge4944a5 #1 SMP PREEMPT Wed Mar 14 16:48:19 
PDT 2018 armv7l GNU/Linux
root@mur0011:~# whoami
  • 2
    SSH and sudo permissions are not related - your root account probably has a default password set from when it was installed. – l0b0 Nov 8 '18 at 1:42
  • @l0b0 I am using PuTTY and serial interface lets me log in without a password but ssh does prompt for it. To make sure I tried sudo passwd -dl root link also , ssh -v generates the following error : Permission denied, please try again. debug1: read_passphrase: can't open /dev/tty: No such file or directory – Aditya Nov 8 '18 at 1:54
  • some versions of login(1) look at a securetty file that may whitelist root access to the system without password, on the presumption that attackers do not have physical access to such – thrig Nov 8 '18 at 2:37

The sshd server will always ask for a password, unless you configure it to allow empty passwords. Also, it most current default configurations, sshd is configured to disallow root logins or only allow root using public key authentication.

So, you should ensure that root can login through ssh and that empty passwords are allowed:


PermitRootLogin yes
PasswordAuthentication yes
PermitEmptyPasswords yes

You will also need to set an empty root password. This is not the same thing as no password. No password is defined as either a non-existent password or an illegal password. In either of these cases, an implicit, but impossible to enter, password will be required. This, of course, means that root will not be able to login directly. So, an empty password is what is required.

Please note:

This is very poor security and should only be used within a trusted network that is not directly accessible from the Internet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.