LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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

Reply
 
Search this Thread
Old 11-14-2004, 11:22 PM   #1
chadi
Member
 
Registered: Aug 2004
Posts: 96

Rep: Reputation: 15
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
 
Old 11-15-2004, 01:13 AM   #2
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,438

Rep: Reputation: 52
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
 
Old 11-15-2004, 05:33 AM   #3
chadi
Member
 
Registered: Aug 2004
Posts: 96

Original Poster
Rep: Reputation: 15
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
 
Old 11-15-2004, 05:38 AM   #4
Kess78
Member
 
Registered: Jul 2004
Location: Switzerland
Distribution: Debi@n, SuSE
Posts: 36

Rep: Reputation: 15
What is that '-l' ???
Do you need this '-l' ???
Try simply "su" or "su -"...
 
Old 11-15-2004, 05:38 AM   #5
chadi
Member
 
Registered: Aug 2004
Posts: 96

Original Poster
Rep: Reputation: 15
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
 
Old 11-15-2004, 08:44 AM   #6
chadi
Member
 
Registered: Aug 2004
Posts: 96

Original Poster
Rep: Reputation: 15
Can someone please help
 
Old 11-15-2004, 10:00 AM   #7
Archangel-13
LQ Newbie
 
Registered: Nov 2004
Distribution: Arch Linux
Posts: 15

Rep: Reputation: 0
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.
 
Old 11-15-2004, 01:46 PM   #8
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,438

Rep: Reputation: 52
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
 
Old 11-15-2004, 02:22 PM   #9
chadi
Member
 
Registered: Aug 2004
Posts: 96

Original Poster
Rep: Reputation: 15
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?)
 
Old 11-15-2004, 02:24 PM   #10
chadi
Member
 
Registered: Aug 2004
Posts: 96

Original Poster
Rep: Reputation: 15
/var/log/messages is empty and /var/log/syslog says "new file" when in edit mode.
 
Old 11-15-2004, 02:25 PM   #11
chadi
Member
 
Registered: Aug 2004
Posts: 96

Original Poster
Rep: Reputation: 15
Every time I run ssh -l user@host (replace user with actual username) it shows the usage command help list.
 
Old 11-16-2004, 08:00 AM   #12
dimndskier
LQ Newbie
 
Registered: Nov 2004
Location: Virginia
Distribution: Red Hat Linux ES 9.0
Posts: 1

Rep: Reputation: 0
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.
 
Old 11-18-2004, 01:31 PM   #13
gd2shoe
Member
 
Registered: Jun 2004
Location: Northern CA
Distribution: Debian
Posts: 835

Rep: Reputation: 49
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.
 
  


Reply


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
can't login as root anymore TranceDude Linux - Software 1 09-18-2005 05:08 PM
Remote server, unable to SSH anymore Keiser Linux - Newbie 1 05-06-2005 10:13 PM
New firewall: ssh on port 80 not working anymore... norbi99 Linux - Security 4 10-09-2004 09:14 AM
I can't login anymore! rcaldera Red Hat 4 12-23-2003 11:34 AM
SSH doesn't work anymore rlina50 Linux - Networking 1 01-29-2002 07:57 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration