LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-05-2018, 06:51 PM   #1
sniper8752
Member
 
Registered: Oct 2012
Posts: 564

Rep: Reputation: Disabled
SSH login attempts fail


I am trying to login to my Ubuntu server from the internal lan. I get these errors in the auth.log file though (ssh fails out for the user):
Code:
Connection from 192.168.1.x port 90 on 192.168.1.1 port 22
Failed publickey for usera from 192.168.1.x port 90 ssh2: RSA SHA256:lkjflksdajflkjdsflkjsdkfjask
error: Received disconnect from 192.168.1.x port 90:14: No supported authentication methods available [preauth]
Disconnected from 192.168.1.x port 90 [preauth]
I go onto the server, login, tail the log, try to ssh again from the client, and it works just fine. What could be causing this?
 
Old 02-06-2018, 08:22 AM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
It superficially looks to me that the public-key is wrong or not installed on the server. Nothing about "logging into the server and tailing the log" should have any effect on this – that's a red herring. It could have something to do with the "ssh key-agent."
 
Old 02-06-2018, 04:34 PM   #3
sniper8752
Member
 
Registered: Oct 2012
Posts: 564

Original Poster
Rep: Reputation: Disabled
I didn't think it would either. But this is not the first time this has happened. It definitely is there though, because after some time, without doing anything, I am able to logon.
 
Old 02-15-2018, 05:38 PM   #4
sniper8752
Member
 
Registered: Oct 2012
Posts: 564

Original Poster
Rep: Reputation: Disabled
After a reboot of the server, I cannot ssh. When I logon to the server, then change to the .ssh directory, then attempt to ssh in, it works fine. Could it be some kind of mounting problem? I will see if I can find anything in dmesg that would hint to this.
 
Old 02-23-2018, 01:49 PM   #5
sniper8752
Member
 
Registered: Oct 2012
Posts: 564

Original Poster
Rep: Reputation: Disabled
Update: It seems that just logging into the user account seems to allow ssh to work. Is there any kind of mounting that would take place during/after login?
 
Old 02-23-2018, 03:28 PM   #6
Screw Loose Dan
LQ Newbie
 
Registered: Feb 2018
Location: Collegeville, PA
Distribution: Ubuntu, Raspbian
Posts: 1

Rep: Reputation: Disabled
Is your home directory encrypted? Perhaps when you login it unencrypts the .ssh directory, allowing you to authenticate. Also, try ssh with the -v to get a lot more verbose messages about what the client is doing.

If you do have an encrypted /home file system, see this page's troubleshooting steps to place your key's outside the encrypted file system.

Last edited by Screw Loose Dan; 02-23-2018 at 03:35 PM.
 
  


Reply



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
SSH login attempts Capt_Caveman Linux - Security 225 11-07-2009 09:55 AM
SSH Login Attempts - Can passwords be captured? SlowCoder Linux - Server 6 10-07-2007 07:16 PM
Question about failed ssh login attempts natv Linux - Security 3 02-11-2007 06:46 AM
Failed SSH login attempts Capt_Caveman Linux - Security 38 01-03-2006 03:22 PM
ssh login attempts from localhost?! sovietpower Linux - Security 2 05-29-2005 01:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration