Linux - NewbieThis 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
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.
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?
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."
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.
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.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.