LinuxQuestions.org
Visit Jeremy's Blog.
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-27-2015, 12:21 AM   #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-27-2015, 12:35 AM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=14, FreeBSD_10{.0|.1|.2}
Posts: 3,876
Blog Entries: 1

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

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
you do not
 
Old 08-27-2015, 03:17 AM   #4
Elizine
Member
 
Registered: Aug 2015
Posts: 46
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, 03:32 AM   #5
ondoho
Senior Member
 
Registered: Dec 2013
Posts: 4,176

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


Reply


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
i forget my root password. how to login in root account with new password in red hat. balajiraja Linux - Desktop 3 08-22-2012 02:41 AM
Unable to login using root after changing root password using passwd command rodimail SUSE / openSUSE 3 12-27-2011 11:34 PM
How does on login as the root ? And what password do I use for it ? vigdavies Linux - Newbie 28 10-17-2009 08:53 PM
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


All times are GMT -5. The time now is 08:13 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration