Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-14-2008, 12:11 AM   #1
Senior Member
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 31
ssh root login with null password

I have a RH server , I have change its root password to null ( remove all word in password field of /etc/shadow ) , now I can't use ssh -l root my_server to login as root again , can advise how can I login again ? thx
Old 04-14-2008, 12:42 AM   #2
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Do you have physical access to this box?
Old 04-14-2008, 12:46 AM   #3
Registered: Sep 2006
Location: Nagpur, Maharashtra, India
Distribution: Debian, Ubuntu, Redhat, Fedora, SLES, OpenSUSE, FreeBSD, Mac OS X
Posts: 221

Rep: Reputation: 31
If you have the physical access to the machine follow the following steps:

Edit the file /etc/ssh/sshd_config and place the following entry:
PermitEmptyPasswords yes
Restart the sshd service:
#service sshd restart
This will make sure that next time you won't face the same problem
Old 04-14-2008, 02:18 AM   #4
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Please restore your root password. Also root logins are not a good idea for ssh. Are you sure you need it?
If you do, then use Public Key Authentication. If this isn't for automated access use a pass phrase with your keys. You can use ssh-agent to load in the pass phrase once when you begin your session. If you allow null password root access, anyone can break into your server.
Old 04-14-2008, 03:06 AM   #5
Wim Sturkenboom
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
In my opinion direct root access using SSH defeats the object. It's the first thing that hackers will try. And empty root passwords will not improve that situation.

I don't allow direct root access; user can login (ssh withe key authentication and passphrase) as normal user and next su to root.

I should not wait an hour between writing and clicking the button

Last edited by Wim Sturkenboom; 04-14-2008 at 10:52 AM. Reason: Added OOPS


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Password Recovery in Edubuntu 7.04 - In Terminal, Root Login : su , password : ????? farhannaeem13 Linux - Security 3 11-30-2007 10:59 AM
How to set login and password and root password in suse 10.2 sirius57 SUSE / openSUSE 8 07-24-2007 10:51 AM
ssh login without password centos1986 Linux - Security 1 05-01-2007 08:45 AM
ssh login with normal user, receive: /dev/null: Permission denied mark78301 Red Hat 3 11-12-2005 10:20 AM
ssh password set to NULL? SiLiCoN Linux - Security 2 09-20-2004 07:53 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:59 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration