summaryrefslogtreecommitdiff
path: root/debian/vyatta-cfg-system.postinst.in
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-12-17 11:12:51 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-12-17 11:20:22 -0800
commit6eb5d3d507505e443cfe8d0d5a223a135c415ea9 (patch)
tree7abd61d87a14d0bc8af243f79e4a4b6fe31f92c1 /debian/vyatta-cfg-system.postinst.in
parentb51b832c77935771acdb28e7ced58a4cb0af0a91 (diff)
downloadvyatta-cfg-quagga-6eb5d3d507505e443cfe8d0d5a223a135c415ea9.tar.gz
vyatta-cfg-quagga-6eb5d3d507505e443cfe8d0d5a223a135c415ea9.zip
Add path to SSH V1 host key to config
SSH config file is based off of Debian distributed version which does not have SSH protocol version 1 key path.
Diffstat (limited to 'debian/vyatta-cfg-system.postinst.in')
-rw-r--r--debian/vyatta-cfg-system.postinst.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in
index 4c5defd4..72e79abe 100644
--- a/debian/vyatta-cfg-system.postinst.in
+++ b/debian/vyatta-cfg-system.postinst.in
@@ -43,7 +43,15 @@ if [ "$sysconfdir" != "/etc" ]; then
# make sure PasswordAuthentication is on
sed -i 's/^#PasswordAuthentication/PasswordAuthentication/' /etc/ssh/sshd_config
sed -i '/^PasswordAuthentication/s/no/yes/' /etc/ssh/sshd_config
+
+ # add HostKeys for protocol version 1
+ if ! grep -q '^HostKey /etc/ssh/ssh_host_key' /etc/ssh/sshd_config; then
+ echo '# HostKey for protocol version 1' >> /etc/ssh/sshd_config
+ echo 'HostKey /etc/ssh/ssh_host_key' >> /etc/ssh/sshd_config
+ fi
+
# add UseDNS line
+ sed -i '/^UseDNS/d' /etc/ssh/sshd_config
echo 'UseDNS yes' >>/etc/ssh/sshd_config
# for "admin" level