Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 04-23-2009, 04:28 PM   #1
Registered: Feb 2009
Posts: 50

Rep: Reputation: 15
Question su passwd when using SSH key file

i have a box on which i have root access but to which i connect using SSH and a key file instead of the password.

when i use su and want to go back to root, it prompts me for password, which i do not have because of using the key file. what is the trick to be able to return to root in that case ?
Old 04-23-2009, 04:48 PM   #2
LQ 5k Club
Registered: May 2003
Location: London, UK
Distribution: Debian "Testing"
Posts: 6,096

Rep: Reputation: 408Reputation: 408Reputation: 408Reputation: 408Reputation: 408
If you have a ssh "key" that allows you a root login without a password, then you are root the moment you log into the box. Your shell prompt should remind you of this.

If, as root on that box, you have su'd to another user, and now want to revert to being root, then just type exit at the prompt or issue <CRTL><d>, and you will be back as root.

If you don't know the root password, we are not able to help you find out what it is, but if you can ssh in as root, you can, of course, change the root password to whatever you like.
Old 04-23-2009, 04:58 PM   #3
Registered: Feb 2009
Posts: 50

Original Poster
Rep: Reputation: 15
yeah, exit does the job. thanks !


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
open-ssh vs. commercial ssh (tru64), public-key auth not possible? cf050 Linux - Networking 8 03-28-2012 12:15 PM
ssh for not asking passwd linuxguy08 Linux - Server 13 09-04-2008 12:58 AM
ssh without passwd abd_bela Debian 4 06-23-2008 03:55 PM
ssh and passwd asked fjaspart Linux - Networking 3 06-22-2007 03:16 AM
can i change my passwd and login to ssh? pippet Linux - Newbie 1 10-27-2004 02:41 AM > Forums > Linux Forums > Linux - Newbie

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

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