LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 03-30-2008, 02:01 PM   #1
astroboiii
Member
 
Registered: Feb 2004
Posts: 83

Rep: Reputation: 15
ssh not working anymore


Was on my laptop one night, putty'd into my local ubuntu server and I shutdown my laptop without exiting my putty session. Now I cannot log into my linux server in any way except locally (on the 'nix box itself that is).

I have uninstalled and reinstalled openssh-server/client and nothing seems to work.

Any help would be greatly appreciated.

Thank You
 
Old 03-30-2008, 02:11 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
Perhaps you have an inconsistent utmp or wtmp file (see “man utmp”) which might throw off the ssh server. Try removing them from a livecd (with a backup of course).
 
Old 03-30-2008, 03:11 PM   #3
astroboiii
Member
 
Registered: Feb 2004
Posts: 83

Original Poster
Rep: Reputation: 15
Thank you for the immediate response!

I will try what you have requested once Ifind out more about utmp (as far as I can tell it keeps track of logins/logouts on the system).


however restarting the server yields the same broken ssh results so I'm not sure if it will help.
 
Old 03-30-2008, 07:48 PM   #4
astroboiii
Member
 
Registered: Feb 2004
Posts: 83

Original Poster
Rep: Reputation: 15
still having no luck getting it going
 
Old 03-30-2008, 10:15 PM   #5
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,192

Rep: Reputation: 538Reputation: 538Reputation: 538Reputation: 538Reputation: 538Reputation: 538
Have you checked /var/log/system, /var/log/auth and /var/log/messages on you Ubuntu box? Any ssh problems *should* show up there.

Also, try to ssh from a console on you Ubuntu machine into the machine itself. Might sound weird, but it works. If you succeed, there is nothing wrong with your server, but indeed on the client side. Do this experiment with the same user name as used on the laptop. If you are logged in differently on the Ununtu machine, use:
Code:
ssh -l -username-as-on-the-laptop localhost
jlinkels
 
Old 03-31-2008, 07:53 PM   #6
astroboiii
Member
 
Registered: Feb 2004
Posts: 83

Original Poster
Rep: Reputation: 15
checking /var/log/auth every time I log in i get this

Mar 31 19:45:01 astro CRON[12239]: pam_unix(cron:session): session opened for user root by (uid=0)
Mar 31 19:45:01 astro CRON[12239]: pam_unix(cron:session): session closed for user root

and as usual my ssh session just times out

and I can login locally on the ubuntu box, so the server is most likely running fine as you said.

I was getting a bind issue but found that if I go into my sshd_config file and uncomment the ListenAddress 0.0.0.0 line and that removed the binding error but still wouldn't allow me to log in.

thank's again for all your help everyone.
 
Old 03-31-2008, 08:10 PM   #7
linux1000
LQ Newbie
 
Registered: Mar 2008
Posts: 2

Rep: Reputation: 0
try to run ssh with -v -v or -vv to get more debugging info from the ssh connection

Code:
ssh -v -v -l -username-as-on-the-laptop localhost
Quote:
Originally Posted by astroboiii View Post
checking /var/log/auth every time I log in i get this

Mar 31 19:45:01 astro CRON[12239]: pam_unix(cron:session): session opened for user root by (uid=0)
Mar 31 19:45:01 astro CRON[12239]: pam_unix(cron:session): session closed for user root

and as usual my ssh session just times out

and I can login locally on the ubuntu box, so the server is most likely running fine as you said.

I was getting a bind issue but found that if I go into my sshd_config file and uncomment the ListenAddress 0.0.0.0 line and that removed the binding error but still wouldn't allow me to log in.

thank's again for all your help everyone.
 
Old 03-31-2008, 08:29 PM   #8
astroboiii
Member
 
Registered: Feb 2004
Posts: 83

Original Poster
Rep: Reputation: 15
I'm not sure what you mean exactly, do you mean run ssh -v on the ubunto box? I don't see how that would help as it would be local.

Unless you meant something else.

Just to note, I am using Putty on my XP laptop to ssh in to the ubuntu box.
 
Old 03-31-2008, 09:08 PM   #9
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
I am surprised that you could ever ssh into an Ubuntu box as root. Root logins are supposed to be disabled, and it is best practice to disable logging into ssh as root. Can you log in as a regular user on the ubuntu box?

Check if the ssh daemon is running on the Ubuntu box. Also use a telnet client to see if you get a response:
Code:
telnet hpmedia 22
Trying 192.168.1.105...
Connected to hpmedia.
Escape character is '^]'.
SSH-2.0-OpenSSH_4.6
Do you see a similar message?
 
Old 03-31-2008, 09:10 PM   #10
astroboiii
Member
 
Registered: Feb 2004
Posts: 83

Original Poster
Rep: Reputation: 15
I was never logging in as root, but instead as a particular user. Sorry for the misunderstanding. Also I cannot even telnet to the ssh server on port 22 from my windows box. Everything works locally, but nothing works from the outside in.

ssh is definitely running.
 
Old 04-01-2008, 08:16 AM   #11
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
It sounds like either the service isn't running or port 22 is blocked by the firewall.
 
Old 04-01-2008, 06:16 PM   #12
astroboiii
Member
 
Registered: Feb 2004
Posts: 83

Original Poster
Rep: Reputation: 15
I'm not too sure myself. Well I do know for certain that the firewall is working fine (by that I mean my router).

I mean I haven't changed anything in the ubuntu box either so I shouldn't have to go into any messy iptables type of thing.

as for the service itself, if it's working locally than it should be running fine.... i have no clue what could be going wronte here, even removing/re-installing the the ssh package didn't work.

just lost as to wthell this thing is doing.
 
Old 04-01-2008, 11:59 PM   #13
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Doesn't Ubuntu have a firewall configuration program for the Linux firewall?

Are you trying to ssh into the Linux box from the LAN or the internet. If from the internet, make sure your router forwards port 22 to your Linux box. If from the LAN, then it still sounds like either the service isn't running or the ports are blocked.

Look at "netstat -l" and see if the ssh service is listening. Also check your /etc/hosts.allow & /etc/hosts.deny files.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
TightVNC not working anymore... OverrRyde Linux - Software 10 12-01-2005 05:57 PM
Remote server, unable to SSH anymore Keiser Linux - Newbie 1 05-06-2005 11:13 PM
cannot login to ssh anymore chadi Linux - General 12 11-18-2004 02:31 PM
New firewall: ssh on port 80 not working anymore... norbi99 Linux - Security 4 10-09-2004 10:14 AM
SSH doesn't work anymore rlina50 Linux - Networking 1 01-29-2002 08:57 PM


All times are GMT -5. The time now is 04:04 PM.

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