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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-11-2007, 01:09 AM
|
#1
|
Member
Registered: Sep 2006
Location: Nagpur, Maharashtra, India
Distribution: Debian, Ubuntu, Redhat, Fedora, SLES, OpenSUSE, FreeBSD, Mac OS X
Posts: 221
Rep:
|
ssh without a Password
One of the machine in my network doesn't have a root Password. I have logged out of my machine. When I ssh that machine from some other host in the network it asks for the password. But since it doesn't have any password, simply pressing return key doesn't allow me to login. Please help. It's urgent.
|
|
|
10-11-2007, 01:40 AM
|
#2
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
well add a password would be the very obvious solution... why on earth would you have no root password? failing that ssh to the device with an alternative account and then su to root, as you shouldn't ssh as root anyway. alternatively set up an rsa / dsa preshared key to allow you to securely authenticate without the password phase.
|
|
|
10-11-2007, 01:48 AM
|
#3
|
Member
Registered: Sep 2006
Location: Nagpur, Maharashtra, India
Distribution: Debian, Ubuntu, Redhat, Fedora, SLES, OpenSUSE, FreeBSD, Mac OS X
Posts: 221
Original Poster
Rep:
|
The problem is that the machine which is not having a root password doesn't have a monitor. So far we all used to do ssh and work on it. But now since we have changed the password and restarted the machine neither we can login to that machine nor can we ssh to it. Arranging a monitor for it is not possible.
|
|
|
10-11-2007, 02:15 AM
|
#4
|
Member
Registered: Sep 2007
Location: UK
Distribution: Slackware 12
Posts: 62
Rep:
|
Looks like someone has went, "oh, unprotected machine?" .. "Thank you very much" ..
[root@localhost /]# passwd
[root@localhost /]# New password (? for help): owned
[root@localhost /]# New password (again): owned
Why do you have no physical access to this machine?
|
|
|
10-11-2007, 02:21 AM
|
#5
|
Member
Registered: Sep 2006
Location: Nagpur, Maharashtra, India
Distribution: Debian, Ubuntu, Redhat, Fedora, SLES, OpenSUSE, FreeBSD, Mac OS X
Posts: 221
Original Poster
Rep:
|
Is there any way I can ssh to that machine?
|
|
|
10-11-2007, 02:26 AM
|
#6
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
so did you change the password or not?
|
|
|
10-11-2007, 02:48 AM
|
#7
|
Member
Registered: Sep 2006
Location: Nagpur, Maharashtra, India
Distribution: Debian, Ubuntu, Redhat, Fedora, SLES, OpenSUSE, FreeBSD, Mac OS X
Posts: 221
Original Poster
Rep:
|
Let me explain the scenario once again. We have one server type machine which doesn't have a monitor. All the members connect to it using ssh and after performing their jobs they logout. We never used to shut down or restart this machine. However oneday we enabled password-less login for user root on the server(#passwd -d root). Accidentally one of our member rebooted the machine using (#init 6). Now since the server doesn't have the monitor we can't login back and change the password and also its not allowing the other machines on the network to login using ssh. Although it asks for password but on simply entering the return key (since root doesn't have the password) it disconnects after two attempts.
|
|
|
10-11-2007, 02:57 AM
|
#8
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
Log in as one of the normal users, su to root and then run the passwd program to create a root passwd.
You shouldn't allow root logins anyway.
|
|
|
10-11-2007, 03:38 AM
|
#9
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
Quote:
Originally Posted by paragkalra
Let me explain the scenario once again. We have one server type machine which doesn't have a monitor. All the members connect to it using ssh and after performing their jobs they logout. We never used to shut down or restart this machine. However oneday we enabled password-less login for user root on the server(#passwd -d root). Accidentally one of our member rebooted the machine using (#init 6). Now since the server doesn't have the monitor we can't login back and change the password and also its not allowing the other machines on the network to login using ssh. Although it asks for password but on simply entering the return key (since root doesn't have the password) it disconnects after two attempts.
|
Love the enthusiasm in your signature mate, but if you're even
partly responsible for the kind of set-up your describing here
you shouldn't be calling yourself "Linux-man".
This is just insane. Really you should be put in the stocks.
Sorry, this isn't helping you, but it had to be said. That's
about as dumb as playing with matches in a tub full of fuel.
Cheers,
Tink
|
|
|
10-11-2007, 05:01 AM
|
#10
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,399
|
C'mon Tink, don't hold back - say what you really think ... 
|
|
|
10-11-2007, 05:21 AM
|
#11
|
Member
Registered: Sep 2007
Location: UK
Distribution: Slackware 12
Posts: 62
Rep:
|
The forums are highly charged this morning, I can fee the tension in the air, so much so ...... i've just punched my work colleague in the face. DAMN YOU LQ!!!!
|
|
|
11-04-2007, 11:39 AM
|
#12
|
Member
Registered: Sep 2006
Location: Nagpur, Maharashtra, India
Distribution: Debian, Ubuntu, Redhat, Fedora, SLES, OpenSUSE, FreeBSD, Mac OS X
Posts: 221
Original Poster
Rep:
|
Few weeks back when I posted my query, everyone bashed me instead of helping me. However I have learnt the lesson hardway. So next time when any of you want to do or enable passwordless ssh, just edit the file /etc/ssh/sshd_config and place the following entry:
Restart the sshd service:
Thats it you are done. Now you can ssh to a machine with a username who doesn't have a password.
|
|
|
11-04-2007, 12:11 PM
|
#13
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
there's a reason that is disabled... you got into that state from a very poor security policy and you're trying to make it even worse it seems.
|
|
|
11-04-2007, 12:48 PM
|
#14
|
Member
Registered: Sep 2006
Location: Nagpur, Maharashtra, India
Distribution: Debian, Ubuntu, Redhat, Fedora, SLES, OpenSUSE, FreeBSD, Mac OS X
Posts: 221
Original Poster
Rep:
|
I am being misunderstood, I guess. See I am a small kid in front of you guys (I am just 22). Your experience on NIX is more than my age. So I am in no position what so ever to argue with you guys. But my point is that I am not running a production house (But I intend to oneday). I try to discover Linux every day at my home. And one day while playing with Linux I was caught in unconfortable position. My question that day was how to enable passwordless login through ssh (Sorry, if I was not clear). Actually the topic and question was off tracked right from the first reply. Everyone dragged me under hammer. I know what I asked meant poor security, but that was not my question. I we people can't answer or don't wish to answer, at least we should not discourage people specially newbies like me. I know newbies don't have command over Linux and therefore we are called newbies.
The bottom line is we should be precise with our replies. Don't curse or abuse people. Don't take the question miles away from it's topic. Don't be worried about teaching someone a lesson. He or she would any how learn it from the difficulties.
What we should focus is to help others and encourage people to be free on forums specially newbies. More than anything else it would encourage more and more people to use LINUX.
|
|
|
11-04-2007, 02:05 PM
|
#15
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
I'm sure borrowing a keyboard and monitor & even a video card if it doesn't have one from one of the systems you use to log in shouldn't be too hard. The root account should have a password. Also, you should be logging in as a regular user and only su to root when you need to do administrative work.
One thing you could try without a monitor is to add a keyboard and log into root at the terminal blindly. After you are sure the machine has had time to boot up, press [CTRL]-[ALT]-F1 to be sure that the machine is at a virtual terminal, then enter "root" & enter.
Next enter "passwd[RETURN-KEY]a-new-password".
---
Imagine going to the doctor and saying your head hurts when you hit it with a ball peen hammer.
The doctor will probably berate you as well before saying "Well don't hit you head with a ball peen hammer."
Last edited by jschiwal; 11-04-2007 at 02:07 PM.
|
|
|
All times are GMT -5. The time now is 07:42 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|