LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-26-2015, 11:21 PM   #1
yjadhav
LQ Newbie
 
Registered: Aug 2015
Posts: 1

Rep: Reputation: Disabled
Login to root without password


How to login to root without password from normal user.
Actuall I have to switch the users many times. So want this one
 
Old 08-26-2015, 11:35 PM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,264
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Test question or multiple logins for same user?
 
Old 08-27-2015, 12:36 AM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
you do not
 
Old 08-27-2015, 02:17 AM   #4
Elizine
Member
 
Registered: Aug 2015
Posts: 54
Blog Entries: 1

Rep: Reputation: Disabled
Hi,

You can run the following script for login to root without password -
You need to add your key to the root authorized_keys file on the server.

On the Server

sudo su - root
ssh-keygen (to make sure root has the .ssh directory etc)
Add your public key to .ssh/authorized_keys
Check your sshd_config settings (/etc/ssh/sshd_config) are correct one last time.

PermitRootLogin without-password
RSAAuthentication yes
PubkeyAuthentication yes
Ensure those settings take effect by restarting ssh: service ssh restart

On the Client

Login to the server as root using: ssh root@yourserveraddress
Note: If this doesn't work you'll need to do some further investigations.. Try posting the results of an ssh -v root@yourserveraddress.

Hope this will help you.
 
Old 08-27-2015, 02:32 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by astrogeek View Post
i second that.
 
  


Reply



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
i forget my root password. how to login in root account with new password in red hat. balajiraja Linux - Desktop 3 08-22-2012 01:41 AM
Unable to login using root after changing root password using passwd command rodimail SUSE / openSUSE 3 12-27-2011 10:34 PM
How does on login as the root ? And what password do I use for it ? vigdavies Linux - Newbie 28 10-17-2009 07:53 PM
Password Recovery in Edubuntu 7.04 - In Terminal, Root Login : su , password : ????? farhannaeem13 Linux - Security 3 11-30-2007 09:59 AM
How to set login and password and root password in suse 10.2 sirius57 SUSE / openSUSE 8 07-24-2007 09:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:20 AM.

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