LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-21-2015, 07:42 PM   #1
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,177

Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
SSH - login failure on two Slackware servers


I'm fairly sure this isn't a Slackware issue at all, but I am more than a little perplexed as to where exactly the blame lies. Late last week I suddenly found myself no longer able to log in to a Slackware server that has been up and running for 3 years at Business A (it's now at Slackware 14.1). And just today I found myself unable to log in to yet another Slackware server that has been up and running for 5 years at Business B (now at 13.37). Have I been hacked? I use a public/private key pair for login at both locations, with root and password login disabled in /etc/sshd_config and sshd running on a non-standard port.

For access while on the road I keep the private keys on a USB flash drive inside a 16-digit password-protected Jetico BestCrypt archive. I inadvertently left this USB device attached overnight to a PC at Business A last week but the archive was not open.

I have been unable to get to either location in person to see what's going on. However, I still had the first terminal open today to Business B which remained open when the login failure occurred on the second terminal I was opening, so I was able to check a few things. Permissions at ~/.ssh on remote host are 700 and at ~/.ssh/authorized_keys 600. Permissions at the local end for the private key are 700. File ownership for the entire /home/serveradmin directory is serveradmin:serveradmin. I have tried logging in from Windows and Slackware, with the same problem on both.

Below is a sample session from Windows (scrubbed):
Code:
C:\Users\Gerard>ssh -v -p 22xxx -i keys\server-openssh serveradmin@xxx.xxx.xxx.xxx
OpenSSH_6.6.1, OpenSSL 1.0.1i 6 Aug 2014
debug1: Connecting to xxx.xxx.xxx.xxx [xxx.xxx.xxx.xxx] port 22xxx.
debug1: Connection established.
debug1: identity file server-openssh type 1
debug1: identity file server-openssh-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9
debug1: match: OpenSSH_5.9 pat OpenSSH_5* compat 0x0c000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA bf:fc:4a:3a:1b:9e:4f:c1:66:59:59:83:41:75:da:18
debug1: Host '[xxx.xxx.xxx.xxx]:22xxx' is known and matches the ECDSA host key.
debug1: Found key in /.ssh/known_hosts:2
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: server-openssh
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).
The only thing I have been doing on both servers recently is setting them up as backup servers on the LAN and over VPN, using rsnapshot. This hasn't involved any SSH changes at all, as I have been using rsnapshot to pull Windows backups, with rsyncd at the client end running as a daemon, so no SSH needed. Any ideas? I really don't think I have been hacked as I am religious about access to these servers and they are vanilla Slackware installs, with perhaps one or two Slackbuilds on top.


Last edited by Gerard Lally; 01-21-2015 at 08:28 PM. Reason: corrected error which had crept in when I scrubbed ssh log
 
Old 01-21-2015, 08:02 PM   #2
pcninja
Member
 
Registered: Oct 2013
Location: SE Wisconsin, USA
Distribution: Arch Linux
Posts: 93

Rep: Reputation: Disabled
Unlike many of the other people I've seen here, I am not a linux expert. My only guess is that, you have two different versions of the sshd package and that might be causing conflicts.
 
Old 01-21-2015, 08:20 PM   #3
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,177

Original Poster
Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by pcninja View Post
Unlike many of the other people I've seen here, I am not a linux expert. My only guess is that, you have two different versions of the sshd package and that might be causing conflicts.
Each server runs the sshd daemon that came with the official Slackware release.

I have been logging in without issue for years from multiple SSH clients as well - ssh on Slackware 13 and 14, NetBSD 6 and 7, Crux 3, Windows 2003, Windows 7 and Windows 8.1. Having multiple versions of the server daemon and clients has not caused me a single problem for at least 5 years. I suspect it hasn't suddenly become the cause of my current predicament, but thanks for your reply anyway.
 
Old 01-21-2015, 08:22 PM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

have you checked what sshd is logging on the machine you still have a terminal on? It should provide much more useful information than the ssh client output.

Evo2.
 
Old 01-21-2015, 08:32 PM   #5
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,177

Original Poster
Rep: Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761Reputation: 1761
Quote:
Originally Posted by evo2 View Post
Hi,

have you checked what sshd is logging on the machine you still have a terminal on? It should provide much more useful information than the ssh client output.

Evo2.
Hi,

unfortunately the terminal that was still open died when my unreliable 3G broadband temporarily lost its connection. But this is a good idea; I really need to get there in person tomorrow to check this log.
 
  


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
[SOLVED] SSH login failed pam_unix authentication failure error yogesh_attarde Linux - Security 3 05-19-2015 06:17 AM
nis user login failure from remote host (ssh,sshd) freeindy Linux - Networking 1 01-18-2008 06:16 AM
nis user login failure from remote host (ssh,sshd) freeindy Linux - Security 1 01-17-2008 03:21 PM
login & ssh failure JJX Debian 2 05-24-2006 04:35 PM
Slackware login failure nutz Linux - Software 3 11-25-2003 03:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:31 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