Skip to content

Commit 958abbe

Browse files
Disable experimental client roaming
1 parent 0ce5cd0 commit 958abbe

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

metadata.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@
2121
license "Apache 2.0"
2222
description "This cookbook installs and provides secure ssh and sshd configurations."
2323
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
24-
version "1.1.0"
24+
version "1.2.0"
2525

2626
recipe 'ssh-hardening::default', 'installs and configures ssh client and server'
2727
recipe 'ssh-hardening::client', 'install and apply security hardening for ssh client'
2828
recipe 'ssh-hardening::server', 'install and apply security hardening for ssh server'
29-

spec/recipes/client_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@
6161
with_content(/Ciphers [^#]*-cbc\b/)
6262
end
6363

64+
it 'disables client roaming' do
65+
expect(chef_run).to render_file('/etc/ssh/ssh_config').
66+
with_content(/UseRoaming no/)
67+
end
68+
6469
it 'enables ctr ciphers' do
6570
expect(chef_run).to render_file('/etc/ssh/ssh_config').
6671
with_content(/Ciphers [^#]*\baes128-ctr\b/).

templates/default/openssh.conf.erb

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<% end %>
44
#---
55

6-
# This is the ssh client system-wide configuration file.
6+
# This is the ssh client system-wide configuration file.
77
# See ssh_config(5) for more information on any settings used. Comments will be added only to clarify why a configuration was chosen.
8-
#
8+
#
99
# Created for OpenSSH v5.9
1010

1111
# Basic configuration
@@ -49,15 +49,15 @@ StrictHostKeyChecking ask
4949
# CBC: is true if you want to connect with OpenSSL-base libraries
5050
# eg ruby Net::SSH::Transport::CipherFactory requires cbc-versions of the given openssh ciphers to work
5151
# -- see: (http://net-ssh.github.com/net-ssh/classes/Net/SSH/Transport/CipherFactory.html)
52-
#
52+
#
5353
<% if @cipher %>
5454
Ciphers <%= @cipher %>
5555
<% end %>
5656

5757
# **Hash algorithms** -- Make sure not to use SHA1 for hashing, unless it is really necessary.
58-
# Weak HMAC is sometimes required if older package versions are used
58+
# Weak HMAC is sometimes required if older package versions are used
5959
# eg Ruby's Net::SSH at around 2.2.* doesn't support sha2 for hmac, so this will have to be set true in this case.
60-
#
60+
#
6161
<% if @mac %>
6262
MACs <%= @mac %>
6363
<% end %>
@@ -68,7 +68,7 @@ MACs <%= @mac %>
6868
# **Key Exchange Algorithms** -- Make sure not to use SHA1 for kex, unless it is really necessary
6969
# Weak kex is sometimes required if older package versions are used
7070
# eg ruby's Net::SSH at around 2.2.* doesn't support sha2 for kex, so this will have to be set true in this case.
71-
#
71+
#
7272
<% if @kex %>
7373
KexAlgorithms <%= @kex %>
7474
<% end %>
@@ -108,4 +108,7 @@ PermitLocalCommand no
108108
Compression yes
109109

110110
#EscapeChar ~
111-
#VisualHostKey yes
111+
#VisualHostKey yes
112+
113+
# http://undeadly.org/cgi?action=article&sid=20160114142733
114+
UseRoaming no

0 commit comments

Comments
 (0)