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 03-25-2009, 07:18 PM   #1
Registered: Jun 2007
Posts: 44

Rep: Reputation: 15
SSH root nopassword failure

Hallo everyone.

I need to get SSH working with remote logins for root and no password.

It's an internal network where I dont have to worry about the security concerns. The server "Linnis" is added to the workstations hosts.equiv and I removed localhost from that file, so SSH should only listen to "Linnis".

I can login as root or any user from the server to workstation fine. When I set the no password for root option in /etc/ssh/sshd_config it still asks for the password however whatever I type will result in a "permission denied" error.

Anyone had this issue and how did you solve it?

PS) Pam over SSH is OFF. I tried "accept zero length passwords" but to no joy.


Old 03-25-2009, 08:56 PM   #2
Senior Member
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
I use public key authentication. This quote comes from somewhere on LQ:

A single command on the client A does this (replace SERVERB by the correct machine name or IP address of server B ):

ssh-keygen -t dsa -f ~/.ssh/identity && cat ~/.ssh/ | ssh SERVERB 'sh -c "cat - >>~/.ssh/authorized_keys2 && chmod 600 ~/.ssh/authorized_keys2"'
... or, if you've already generated your public keys:

cat ~/.ssh/ | ssh SERVERB 'sh -c "cat - >>~/.ssh/authorized_keys2 && chmod 600 ~/.ssh/authorized_keys2"'
edited to add: Of course, you would want to do "... ssh root@SERVERB ..."

Last edited by BrianK; 03-25-2009 at 08:58 PM.
Old 03-26-2009, 09:27 AM   #3
Registered: Jun 2007
Posts: 44

Original Poster
Rep: Reputation: 15
Could you alaborate on what this is doing and why it will solve the problem?

Old 03-26-2009, 11:09 AM   #4
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,749

Rep: Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983Reputation: 7983
Originally Posted by snoopy1 View Post
Could you alaborate on what this is doing and why it will solve the problem?

Andrew get passwordless logins working, you need to establish a 'trust' between the two systems.

The first command generates the dsa key (although I'd do rsa personally), and sends it to the remote machine, putting it in the correct user-file on the remote system.

The second assumes you've already generated the key, and just copies it over. Either way, the remote machine now has a 'key', from your local machine. Once they handshake, SSH recognizes that 'trust', and allows the user to connect, without a password, since he's 'recognized' by the key.

Also, pretty slick command-line BrianK...nice command-chaining.


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
system said the our root password failure when I use ssh to connect Fedora8 vvcat Linux - Security 1 03-03-2008 12:21 PM
ssh logon failure nosbod Linux - Software 2 05-22-2007 07:40 AM
ssh failure when trying to connect jlarsen Linux - Networking 1 10-14-2006 03:06 PM
Smoothwall SSH Failure extremebfn Linux - Networking 1 08-27-2004 12:38 PM
ssh password failure (sometimes) zergio Linux - Security 9 12-10-2003 08:21 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:02 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
Open Source Consulting | Domain Registration