LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Login to root without password (https://www.linuxquestions.org/questions/linux-newbie-8/login-to-root-without-password-4175551849/)

yjadhav 08-26-2015 11:21 PM

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

astrogeek 08-26-2015 11:35 PM

Test question or multiple logins for same user?

John VV 08-27-2015 12:36 AM

you do not

Elizine 08-27-2015 02:17 AM

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.

ondoho 08-27-2015 02:32 AM

Quote:

Originally Posted by astrogeek (Post 5411711)

i second that.


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