Coder Social home page Coder Social logo

sshd's People

Contributors

andytson avatar chr4 avatar cpuid avatar er0 avatar iamjohnnym avatar jeremyolliver avatar jhboricua avatar olbrich avatar pwalz avatar stromweld avatar walters avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sshd's Issues

Archlinux puts SFTP server in /usr/lib/ssh/

The default attributes don't consider the location of Arch linux's SFTP server binary, which is /usr/lib/ssh/sftp-server. Gentoo also puts the binary in the same location as Redhat does, but because you're checking for platform family, isn't detected.

I propose thus:

%w[/usr/lib/openssh/sftp-server
   /usr/libexec/openssh/sftp-server
   /usr/libexec/sftp-server
   /usr/lib/ssh/sftp-server].select do |sftpbin|
  File.exist? sftpbin
end

check_sshd_config block fails on RHEL 5.11 and related EL variants

The 'check_sshd_config' block under definitions/openssh_server.rb fails on RHEL 5.11 with the following error.

---- Begin output of sshd -t -f /etc/ssh/sshd_config ----
STDOUT:
STDERR: sshd re-exec requires execution with an absolute path
---- End output of sshd -t -f /etc/ssh/sshd_config ----
Ran sshd -t -f /etc/ssh/sshd_config returned 255

Modifying the block to use the full path of the sshd binary fixed the issue

execute 'check_sshd_config' do
command "/usr/sbin/sshd -t -f #{filename}"
action :nothing
end

Cloned resource warning for 'node['sshd']['service_name']

  [2016-06-17T17:32:58+00:00] WARN: Cloning resource attributes for service[sshd] from prior resource (CHEF-3694)
  [2016-06-17T17:32:58+00:00] WARN: Previous service[sshd]: /tmp/kitchen/cache/cookbooks/sshd/recipes/install.rb:29:in `from_file'
  [2016-06-17T17:32:58+00:00] WARN: Current  service[sshd]: /tmp/kitchen/cache/cookbooks/sshd/definitions/openssh_server.rb:43:in `block in from_file'

Could probably merge the 'provider' line from install.rb into openssh_server.rb with no issues.

openssh_server resource does not start ssh service on Ubuntu 14.04

openssh_server should start ssh service (using Upstart) on Ubuntu 14.04, but it doesn't at the moment. Tested on Chef 12.1.1 and 12.2.1.

Can login to the machine and start the service fine manually using service ssh start.

Bug in either this cookbook or Chef itself? I see a heap of GH issues on the Chef side relating to Upstart selections etc, and I see the hack in definitions/openssh_server.rb to set the Upstart provider for >13.10. Either way somethings busted :)

Happy to help investigate here if you point me in the right direction.

Attribute ordering causes config error when specifying both Port and ListenAddress

When trying to set both the Port and ListenAddress attributes on Ubuntu 14.04 in combination with this cookbook (sshd is version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2, OpenSSL 1.0.1f 6 Jan 2014), I get the following error when testing the resulting configuration with sshd -t:

/etc/ssh/sshd_config line 15: ports must be specified before ListenAddress.

Looks like strict alphabetical order as represented in generate_sshd_config by config.sort doesn't really work for the combination of these two sshd directives.

I've worked around the problem for now by keeping Port as a node attribute, and setting node['sshd']['sshd_config']['ListenAddress'] to a Hash, where the keys of the hash are IPs or IP/port combinations, and the respective values are empty strings.

Not sure what the best solution is here - whether it is a special case to have Port appear first in the configuration or whether it is worthwhile to have a more in-depth attribute precedence mechanism. If this sufficiently annoys me (since it comes up on nodes with multiple network interfaces/aliases, where I need to specifically bind sshd to only listen to certain IP addresses) I'll submit a pull request, but I'd be interested to hear if there are any other ideas.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.