Linux - NewbieThis 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.
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.
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.
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.
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.
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.
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.
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!!!!
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:
Quote:
PermitEmptyPasswords yes
Restart the sshd service:
Quote:
#service sshd restart
Thats it you are done. Now you can ssh to a machine with a username who doesn't have a password.
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.
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."
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.