0

I temporarily enabled ssh root access to a server, but the access fails after a few minutes with

"Authentication failed."
"Critical error: Could not connect to server"

(I'm using Filezilla)


Is there any place where where I should look, other than /etc/ssh/sshd_config & /etc/shadow ?

Here's the technical context :

One of our customer got a server (Ubuntu 16.04 LTS) outsourced to some external provider, but we are in charge of the installations and maintenance.

The thing is, while we can sudo to root, the outsourcing company stands one layer over us, which creates some complications...

In particular, they use "Chef", and override some of our configs, like the sshd_config, or even our .bashrc & .profile without giving us any mean of customizing it.

Since this creates blocking issues, we already have had to set up a cron to put back our sshd_config every minute (sigh -- temporary solution, of course).

After a few exchanges with what they call support, it appears they don't currently have any solution for these limitations they created.

Since working with those guys becomes quite harassing, we try so keep things as simple as possible now.

Giving root ssh access isn't much of a problem, since the server is hosting only a staging environment, uses IP restrictions, and uses good passwords, but the issue looks quite weird to me.

• We changed root password, and set _permitRoolLogin yes_ in sshd_config
• However, for root, it works if we change the password.... for a short time (say some minutes)
• The other users we set work as expected
So the problem is not on sshd_config's side. I also checked /etc/shadow, and root doesn't seem to have its password changed, so what can it be ?

I'm not used to having so much problems with a server, and this particular one puzzles me, since I don't know where I should look if ssh config & my users are not modified.

Here's the list of the files Chef overrides :
Well, the list includes 2 copies of sshd_config that WE created, but I took the list given by the outsourcing professionnals we are dealing with :), I didn't trim it.



/etc/vsftpd.conf
/etc/rc5.d/S13chef-client
/etc/chef/client.rb
/etc/alternatives/aptitude
/etc/zabbix/zabbix_agent.conf
/etc/zabbix/conf.d/java.discovery.conf
/etc/zabbix/conf.d/disk-io.conf
/etc/zabbix/conf.d/postgres.discovery.conf
/etc/zabbix/conf.d/mysql.conf
/etc/zabbix/conf.d/haproxy.conf
/etc/zabbix/conf.d/apache.conf
/etc/zabbix/conf.d/pgsql.conf
/etc/zabbix/conf.d/apt.conf
/etc/zabbix/zabbix_agentd.conf
/etc/logrotate.conf
/etc/ssh/sshd_config
/etc/ssh/sshd_config.bak
/etc/ssh/sshd_config.new
/etc/cron.daily/apt-update
/etc/init.d/.depend.start
/etc/init.d/.depend.boot
/etc/init.d/chef-client
/etc/sudoers
/etc/logrotate.d/httpd
/etc/rcS.d/S13chef-client

4
  • /etc/pam.d/sshd Dec 22, 2016 at 12:04
  • Would you consider to use some ssh keys perhaps ?
    – Tolsadus
    Dec 22, 2016 at 13:21
  • @Tolsadus Good suggestion, of course (I usually don't use password auth anymore, but this server...). But I'd also like to understand what is going wrong. I'm not aware of something which could get changed when I update my password, but get overriden without having my password changed.
    – Balmipour
    Dec 22, 2016 at 13:29
  • @Sirser I should probably look a bit deeper at pam, since I never toyed with it, and only know it by name, but At first glance, it doesn't get modified when I set-up-my-password-again, so it doesn't look like a plausible source of the problem. I got the list of the files Chef overrides, I'll update my question.
    – Balmipour
    Dec 22, 2016 at 13:38

0

You must log in to answer this question.

Browse other questions tagged .