ssh is not allowing me to login
Hi Guys,
I am new to FreeBSD and just completed my first installation. I am trying to access this system via SSH but system is not allowing me to log in while it is prompting for the password. Don't know what went wrong or I missed anything. Please advise... |
So it prompts for username and password ok then?
Does it say login incorrect when you try and login? Also, who are you trying to login as? |
Quote:
If that doesn't help, then tail /var/log/auth.log on the FreeBSD host while trying to ssh in. Post the messages you see here. |
That's right anomie, I tried login as root but even I did the same thing with normal user and tried su - and system says BAD SU - over .
Right now I do not have FreeBSD machine in front of me. Will paste the auth.log o/p later |
Try su root rather then just su.
Sounds like you're now logging into the box correctly using SSH though, your issue now is elevating your privileges. |
Is your user part of the wheel group?
Code:
pw group show wheel Code:
pw usermod "yourname" -G wheel |
I could login with normal user then su to become root via ssh using pw method, but there is no way by which we can allow root to access directly via ssh.
|
Quote:
But, as with all things, its your choice. The most likely reason you can't login as root is the PermitRootLogin section in /etc/ssh/sshd_config is set to no. Change that line to this: PermitRootLogin Yes then save the file and restart the ssh service, or the whole machine if you want. I never allow root login though, and its ALWAYS the thing to turn off, view various guides online suggesting don't do it. |
I thought that root login was denied as default in FBSD. I´m pretty sure about it.
|
Quote:
As Lee_ball informs, there´s way to Disable it again though. |
disabled, you mean for ssh service only or in pam. Because I could directly login on console that means root is not disabled only thing is I am not able to login via ssh.
And, even I tried doing su - but it says BAD Su for user xxxx |
Yes i mean over ssh. What is your problem now exactly?
Using su ? or... EDIT: Once again, in order to allow user "xxxx" use SU command succesfully, he has to be part of the wheel group. EDIT2: Also the /var/log/auth.log would be nice. |
Quote:
When you login at the console, you're not using SSH to login with so there is still a good chance its locked down. I still think its a bad idea and using su to elevate privileges once logged in with a normal user account is always the way to go. See here for examples of people suggesting lock it down: http://blog.dbugs.org/2007/08/29/ssh-security/ http://www.wikihow.com/Secure-a-Linux-Server - See point 4 With regards to root logging in via ssh see this article: http://www.ssh.com/.../Configuring_Root_Logins.html |
Please see this recent news article regarding why being able to login as root is a baaaaadddd idea:
http://www.builderau.com.au/program/...9298642,00.htm |
All times are GMT -5. The time now is 08:23 AM. |