Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-14-2004, 11:22 PM
|
#1
|
|
Member
Registered: Aug 2004
Posts: 96
Rep:
|
cannot login to ssh anymore
SSH (is up and runing) is not letting me in.
I have direct root disabled but the user is in the usergroup and I logged in with user/password fine. I type su -l and it asks for root password of course, typed that and enter...but then nothing happens just breaks a new line and no text.
I enter a few times and get "bad message".
How do I fix this?
Fedora Core
cPanel/WHM
|
|
|
|
11-15-2004, 01:13 AM
|
#2
|
|
Senior Member
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,430
Rep:
|
Hmm, I am kind of confused at your question. You say you disabled root login via ssh and when you try to ssh, it asks for root and you type it in and you get nothing. Am I right? If you disabled root access, then why are you trying to log in as root??
1. How are you trying to connect to your box? 'ssh user@your.box.ip.address'? (user=someone on the system other than root)
2. 'su -l' is not a valid command logging in to your box via ssh. I don't believe (at least it doesn't exist on my box) that there is an -l argument for su.
-twantrd
|
|
|
|
11-15-2004, 05:33 AM
|
#3
|
|
Member
Registered: Aug 2004
Posts: 96
Original Poster
Rep:
|
Please pay attention to what I said. I disalbed DIRECT root login but I added a user to the wheelgroup.
su -l is valid on my box
|
|
|
|
11-15-2004, 05:38 AM
|
#4
|
|
Member
Registered: Jul 2004
Location: Switzerland
Distribution: Debi@n, SuSE
Posts: 36
Rep:
|
What is that '-l' ???
Do you need this '-l' ???
Try simply "su" or "su -"...
|
|
|
|
11-15-2004, 05:38 AM
|
#5
|
|
Member
Registered: Aug 2004
Posts: 96
Original Poster
Rep:
|
Quote:
Originally posted by Kess78
What is that '-l' ???
Do you need this '-l' ???
Try simply "su" or "su -"...
|
I have done that but same problem
|
|
|
|
11-15-2004, 08:44 AM
|
#6
|
|
Member
Registered: Aug 2004
Posts: 96
Original Poster
Rep:
|
Can someone please help
|
|
|
|
11-15-2004, 10:00 AM
|
#7
|
|
LQ Newbie
Registered: Nov 2004
Distribution: Arch Linux
Posts: 15
Rep:
|
I belive your problem can be fixed by using the following:
ssh -l user@host
ssh assumes that you are trying to log in as root unless you specify which users you want.
|
|
|
|
11-15-2004, 01:46 PM
|
#8
|
|
Senior Member
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,430
Rep:
|
Quote:
|
Please pay attention to what I said
|
Geez, trying to help and get bashed for it. First of all, I stated that I was confused at your problem because your title says "cannot login to ssh anymore". However, that is NOT your problem. Your problem is actually trying to 'su' as root once you have successfully logged in as a user.
Anywayz, I'm not really into bickering. Hmmm, for your problem....after you have tried:
su
su -
su - root
and if they were all unsuccessful, have you taken a look at /var/log/messages or /var/log/syslog to see if it reports anything?
-twantrd
|
|
|
|
11-15-2004, 02:22 PM
|
#9
|
|
Member
Registered: Aug 2004
Posts: 96
Original Poster
Rep:
|
Quote:
Originally posted by twantrd
Geez, trying to help and get bashed for it. First of all, I stated that I was confused at your problem because your title says "cannot login to ssh anymore". However, that is NOT your problem. Your problem is actually trying to 'su' as root once you have successfully logged in as a user.
Anywayz, I'm not really into bickering. Hmmm, for your problem....after you have tried:
su
su -
su - root
and if they were all unsuccessful, have you taken a look at /var/log/messages or /var/log/syslog to see if it reports anything?
-twantrd
|
lol sorry I did not mean to sound rude, just stating that I already posted it thats all  I do appreciate your help
archangel... is ssh -l user@host literally username@host (host actually host or server hostname?)
|
|
|
|
11-15-2004, 02:24 PM
|
#10
|
|
Member
Registered: Aug 2004
Posts: 96
Original Poster
Rep:
|
/var/log/messages is empty and /var/log/syslog says "new file" when in edit mode.
|
|
|
|
11-15-2004, 02:25 PM
|
#11
|
|
Member
Registered: Aug 2004
Posts: 96
Original Poster
Rep:
|
Every time I run ssh -l user@host (replace user with actual username) it shows the usage command help list.
|
|
|
|
11-16-2004, 08:00 AM
|
#12
|
|
LQ Newbie
Registered: Nov 2004
Location: Virginia
Distribution: Red Hat Linux ES 9.0
Posts: 1
Rep:
|
Chadi,
root is assumed when you use SSH like someone already stated.
Anyway, here is an example of what you could use as a line.
ssh chadi@server
You DON'T need the -l I stay away from using switch options by default anyway.
Also, since you are already successfully logged in using SSH as some user (like chadi)
maybe you should really look into the issue that su (switchuser) is related to your problem.
What OS are you using specifically?
Furthermore, when you say you dissable root from logging in... what explicitly did you do. Use the option PermitRootLogin and set that to "no"?
That's OK, I have done that on all my systems.
Try another user's login and see if that one works.
I believe that "su - root" can be prevented for certain users to even attempt. Nevermind the fact that you need a valid password to login as root with.
Also, check the sulog if you have one or maybe you have a log simply called secure
Try that.
|
|
|
|
11-18-2004, 01:31 PM
|
#13
|
|
Member
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835
Rep:
|
If I can through in my two cents.
to dimndskier: chadi knows that there are requirements to su to root. He has mentioned the wheel group, which is often used to determine whether a user can su to root or not. I think there are other requirements too. On my system, I have no members of the wheel group, and yet I can su just fine. I'll look into it eventually.
to chadi: If I understand your question correctly about user@host, the host part can be anything that the ssh client can translate into an ip address. I know that dns and dirrect IP addresses both work. I don't know what other name spaces may or may not work.
ssh user@someplace.com
ssh user@127.0.0.1
Hope you figure it out.
Last edited by gd2shoe; 11-18-2004 at 01:33 PM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:14 AM.
|
|
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
|
|