Linux - SoftwareThis 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
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.
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.
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).
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
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:
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.
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
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.
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
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.