sshd 模板出现意外重建错误

插件已禁用 …

+ /usr/bin/docker stop -t 10 app
app
cd /pups && git pull && /pups/bin/pups --stdin
Already up to date.
I, [2019-09-03T04:49:39.718262 #1]  INFO -- : Loading --stdin
I, [2019-09-03T04:49:39.723865 #1]  INFO -- : > locale-gen $LANG && update-locale
I, [2019-09-03T04:49:39.757654 #1]  INFO -- : Generating locales (this might take a while)...
Generation complete.

I, [2019-09-03T04:49:39.757975 #1]  INFO -- : > mkdir -p /shared/postgres_run
I, [2019-09-03T04:49:39.761451 #1]  INFO -- :
I, [2019-09-03T04:49:39.761699 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2019-09-03T04:49:39.764370 #1]  INFO -- :
I, [2019-09-03T04:49:39.764571 #1]  INFO -- : > chmod 775 /shared/postgres_run
I, [2019-09-03T04:49:39.766958 #1]  INFO -- :
I, [2019-09-03T04:49:39.767147 #1]  INFO -- : > rm -fr /var/run/postgresql
I, [2019-09-03T04:49:39.769882 #1]  INFO -- :
I, [2019-09-03T04:49:39.770225 #1]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2019-09-03T04:49:39.772703 #1]  INFO -- :
I, [2019-09-03T04:49:39.772971 #1]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
2019/09/03 04:49:39 socat[26] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
I, [2019-09-03T04:49:39.779186 #1]  INFO -- :
I, [2019-09-03T04:49:39.779393 #1]  INFO -- : > rm -fr /shared/postgres_run/.s*
I, [2019-09-03T04:49:39.782850 #1]  INFO -- :
I, [2019-09-03T04:49:39.783072 #1]  INFO -- : > rm -fr /shared/postgres_run/*.pid
I, [2019-09-03T04:49:39.786229 #1]  INFO -- :
I, [2019-09-03T04:49:39.786469 #1]  INFO -- : > mkdir -p /shared/postgres_run/10-main.pg_stat_tmp
I, [2019-09-03T04:49:39.789114 #1]  INFO -- :
I, [2019-09-03T04:49:39.789389 #1]  INFO -- : > chown postgres:postgres /shared/postgres_run/10-main.pg_stat_tmp
I, [2019-09-03T04:49:39.791882 #1]  INFO -- :
I, [2019-09-03T04:49:39.797813 #1]  INFO -- : File > /etc/service/postgres/run  chmod: +x  chown:
I, [2019-09-03T04:49:39.803014 #1]  INFO -- : File > /etc/service/postgres/log/run  chmod: +x  chown:
I, [2019-09-03T04:49:39.808491 #1]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x  chown:
I, [2019-09-03T04:49:39.813637 #1]  INFO -- : File > /root/upgrade_postgres  chmod: +x  chown:
I, [2019-09-03T04:49:39.814011 #1]  INFO -- : > chown -R root /var/lib/postgresql/10/main
I, [2019-09-03T04:49:40.345139 #1]  INFO -- :
I, [2019-09-03T04:49:40.346160 #1]  INFO -- : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo -E -u postgres /usr/lib/postgresql/10/bin/initdb -D /shared/postgres_data || exit 0
I, [2019-09-03T04:49:40.351006 #1]  INFO -- :
I, [2019-09-03T04:49:40.351231 #1]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
I, [2019-09-03T04:49:40.375603 #1]  INFO -- :
I, [2019-09-03T04:49:40.376024 #1]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
I, [2019-09-03T04:49:40.378446 #1]  INFO -- :
I, [2019-09-03T04:49:40.378813 #1]  INFO -- : > /root/upgrade_postgres
I, [2019-09-03T04:49:40.383962 #1]  INFO -- :
I, [2019-09-03T04:49:40.384252 #1]  INFO -- : > rm /root/upgrade_postgres
I, [2019-09-03T04:49:40.386614 #1]  INFO -- :
I, [2019-09-03T04:49:40.387023 #1]  INFO -- : Replacing data_directory = '/var/lib/postgresql/10/main' with data_directory = '/shared/postgres_data' in /etc/postgresql/10/main/postgresql.conf
I, [2019-09-03T04:49:40.387696 #1]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/10/main/postgresql.conf
I, [2019-09-03T04:49:40.388099 #1]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgresql/10/main/postgresql.conf
I, [2019-09-03T04:49:40.388457 #1]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/10/main/postgresql.conf
I, [2019-09-03T04:49:40.388820 #1]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/10/main/postgresql.conf
I, [2019-09-03T04:49:40.389179 #1]  INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_search_config' in /etc/postgresql/10/main/postgresql.conf
I, [2019-09-03T04:49:40.389500 #1]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
I, [2019-09-03T04:49:40.392868 #1]  INFO -- :
I, [2019-09-03T04:49:40.393170 #1]  INFO -- : Replacing (?-mix:#?max_wal_senders *=.*) with max_wal_senders = $db_max_wal_senders in /etc/postgresql/10/main/postgresql.conf
I, [2019-09-03T04:49:40.393526 #1]  INFO -- : Replacing (?-mix:#?wal_level *=.*) with wal_level = $db_wal_level in /etc/postgresql/10/main/postgresql.conf
I, [2019-09-03T04:49:40.393892 #1]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postgresql/10/main/postgresql.conf
I, [2019-09-03T04:49:40.394223 #1]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/10/main/postgresql.conf
I, [2019-09-03T04:49:40.394560 #1]  INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_statement in /etc/postgresql/10/main/postgresql.conf
I, [2019-09-03T04:49:40.394966 #1]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgresql/10/main/pg_hba.conf
I, [2019-09-03T04:49:40.395310 #1]  INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/10/main/pg_hba.conf
I, [2019-09-03T04:49:40.395614 #1]  INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/10/bin/postmaster -D /etc/postgresql/10/main
I, [2019-09-03T04:49:40.397705 #1]  INFO -- : > sleep 5
2019-09-03 04:49:40.421 UTC [49] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2019-09-03 04:49:40.421 UTC [49] LOG:  listening on IPv6 address "::", port 5432
2019-09-03 04:49:40.422 UTC [49] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2019-09-03 04:49:40.504 UTC [52] LOG:  database system was shut down at 2019-09-03 04:48:30 UTC
2019-09-03 04:49:40.511 UTC [49] LOG:  database system is ready to accept connections
I, [2019-09-03T04:49:45.400403 #1]  INFO -- :
I, [2019-09-03T04:49:45.400688 #1]  INFO -- : > su postgres -c 'createdb discourse' || true
2019-09-03 04:49:45.459 UTC [62] postgres@postgres ERROR:  database "discourse" already exists
2019-09-03 04:49:45.459 UTC [62] postgres@postgres STATEMENT:  CREATE DATABASE discourse;
createdb: database creation failed: ERROR:  database "discourse" already exists
I, [2019-09-03T04:49:45.461165 #1]  INFO -- :
I, [2019-09-03T04:49:45.461532 #1]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
2019-09-03 04:49:45.523 UTC [73] postgres@discourse ERROR:  role "discourse" already exists
2019-09-03 04:49:45.523 UTC [73] postgres@discourse STATEMENT:  create user discourse;
ERROR:  role "discourse" already exists
I, [2019-09-03T04:49:45.526360 #1]  INFO -- :
I, [2019-09-03T04:49:45.526735 #1]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
I, [2019-09-03T04:49:45.585075 #1]  INFO -- : GRANT

I, [2019-09-03T04:49:45.585263 #1]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
I, [2019-09-03T04:49:45.642427 #1]  INFO -- : ALTER SCHEMA

I, [2019-09-03T04:49:45.642605 #1]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2019-09-03T04:49:45.703361 #1]  INFO -- : CREATE EXTENSION

I, [2019-09-03T04:49:45.703743 #1]  INFO -- : > su postgres -c 'psql template1 -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2019-09-03T04:49:45.764235 #1]  INFO -- : CREATE EXTENSION

I, [2019-09-03T04:49:45.764580 #1]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists hstore;"'
NOTICE:  extension "hstore" already exists, skipping
I, [2019-09-03T04:49:45.829172 #1]  INFO -- : CREATE EXTENSION

I, [2019-09-03T04:49:45.829528 #1]  INFO -- : > su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"'
NOTICE:  extension "pg_trgm" already exists, skipping
I, [2019-09-03T04:49:45.888279 #1]  INFO -- : CREATE EXTENSION

I, [2019-09-03T04:49:45.888614 #1]  INFO -- : > sudo -u postgres psql discourse
I, [2019-09-03T04:49:45.891093 #1]  INFO -- : update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'discourse' AND encoding = pg_char_to_encoding('SQL_ASCII');

I, [2019-09-03T04:49:45.956513 #1]  INFO -- : File > /var/lib/postgresql/take-database-backup  chmod: +x  chown: postgres:postgres
I, [2019-09-03T04:49:45.959681 #1]  INFO -- : File > /var/spool/cron/crontabs/postgres  chmod:   chown:
I, [2019-09-03T04:49:45.959792 #1]  INFO -- : > echo postgres installed!
I, [2019-09-03T04:49:45.962409 #1]  INFO -- : postgres installed!

I, [2019-09-03T04:49:45.968200 #1]  INFO -- : File > /etc/service/redis/run  chmod: +x  chown:
I, [2019-09-03T04:49:45.973571 #1]  INFO -- : File > /etc/service/redis/log/run  chmod: +x  chown:
I, [2019-09-03T04:49:45.979079 #1]  INFO -- : File > /etc/runit/3.d/10-redis  chmod: +x  chown:
I, [2019-09-03T04:49:45.979445 #1]  INFO -- : Replacing daemonize yes with  in /etc/redis/redis.conf
I, [2019-09-03T04:49:45.980014 #1]  INFO -- : Replacing (?-mix:^pidfile.*$) with  in /etc/redis/redis.conf
I, [2019-09-03T04:49:45.980386 #1]  INFO -- : > install -d -m 0755 -o redis -g redis /shared/redis_data
I, [2019-09-03T04:49:45.983542 #1]  INFO -- :
I, [2019-09-03T04:49:45.983977 #1]  INFO -- : Replacing (?-mix:^logfile.*$) with logfile "" in /etc/redis/redis.conf
I, [2019-09-03T04:49:45.984438 #1]  INFO -- : Replacing (?-mix:^bind .*$) with  in /etc/redis/redis.conf
I, [2019-09-03T04:49:45.984920 #1]  INFO -- : Replacing (?-mix:^dir .*$) with dir /shared/redis_data in /etc/redis/redis.conf
I, [2019-09-03T04:49:45.985389 #1]  INFO -- : Replacing (?-mix:^protected-mode yes) with protected-mode no in /etc/redis/redis.conf
I, [2019-09-03T04:49:45.985766 #1]  INFO -- : > echo redis installed
I, [2019-09-03T04:49:45.988217 #1]  INFO -- : redis installed

I, [2019-09-03T04:49:45.988443 #1]  INFO -- : > cat /etc/redis/redis.conf | grep logfile
I, [2019-09-03T04:49:45.993546 #1]  INFO -- : logfile ""

I, [2019-09-03T04:49:45.993842 #1]  INFO -- : > exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf
I, [2019-09-03T04:49:45.995903 #1]  INFO -- : > sleep 10
166:C 03 Sep 2019 04:49:45.999 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
166:C 03 Sep 2019 04:49:45.999 # Redis version=5.0.5, bits=64, commit=00000000, modified=0, pid=166, just started
166:C 03 Sep 2019 04:49:45.999 # Configuration loaded
                _._

166:M 03 Sep 2019 04:49:46.001 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
166:M 03 Sep 2019 04:49:46.001 # Server initialized
166:M 03 Sep 2019 04:49:46.001 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
166:M 03 Sep 2019 04:49:46.001 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
166:M 03 Sep 2019 04:49:46.148 * DB loaded from disk: 0.147 seconds
166:M 03 Sep 2019 04:49:46.148 * Ready to accept connections
I, [2019-09-03T04:49:55.998550 #1]  INFO -- :
I, [2019-09-03T04:49:55.998915 #1]  INFO -- : Replacing session    required     pam_loginuid.so with  in /etc/pam.d/sshd
I, [2019-09-03T04:49:56.005595 #1]  INFO -- : File > /etc/service/sshd/run  chmod: +x  chown:
I, [2019-09-03T04:49:56.010884 #1]  INFO -- : File > /etc/runit/3.d/99-ssh  chmod: +x  chown:
I, [2019-09-03T04:49:56.011149 #1]  INFO -- : > mkdir -p /var/run/sshd
I, [2019-09-03T04:49:56.013764 #1]  INFO -- :
I, [2019-09-03T04:49:56.014063 #1]  INFO -- : > mkdir -p /root/.ssh
I, [2019-09-03T04:49:56.016635 #1]  INFO -- :
I, [2019-09-03T04:49:56.016841 #1]  INFO -- : > echo "" >> /root/.ssh/authorized_keys
I, [2019-09-03T04:49:56.019199 #1]  INFO -- :
I, [2019-09-03T04:49:56.019283 #1]  INFO -- : > echo "$$ENV_SSH_PUB_KEY" >> /root/.ssh/authorized_keys
I, [2019-09-03T04:49:56.021462 #1]  INFO -- :
I, [2019-09-03T04:49:56.021543 #1]  INFO -- : > chmod 640 /root/.ssh/authorized_keys
I, [2019-09-03T04:49:56.023659 #1]  INFO -- :
I, [2019-09-03T04:49:56.023825 #1]  INFO -- : > rm /etc/update-motd.d/00-header
rm: cannot remove '/etc/update-motd.d/00-header': No such file or directory
I, [2019-09-03T04:49:56.026060 #1]  INFO -- :
I, [2019-09-03T04:49:56.026388 #1]  INFO -- : Terminating async processes
I, [2019-09-03T04:49:56.026449 #1]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/10/bin/postmaster -D /etc/postgresql/10/main pid: 49
I, [2019-09-03T04:49:56.026485 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 166
166:signal-handler (1567486196) Received SIGTERM scheduling shutdown...
2019-09-03 04:49:56.026 UTC [49] LOG:  received fast shutdown request
2019-09-03 04:49:56.027 UTC [49] LOG:  aborting any active transactions
2019-09-03 04:49:56.031 UTC [49] LOG:  worker process: logical replication launcher (PID 58) exited with exit code 1
2019-09-03 04:49:56.032 UTC [53] LOG:  shutting down
2019-09-03 04:49:56.049 UTC [49] LOG:  database system is shut down
166:M 03 Sep 2019 04:49:56.070 # User requested shutdown...
166:M 03 Sep 2019 04:49:56.070 * Saving the final RDB snapshot before exiting.
166:M 03 Sep 2019 04:49:56.265 * DB saved on disk
166:M 03 Sep 2019 04:49:56.265 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: rm /etc/update-motd.d/00-header failed with return #<Process::Status: pid 181 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"hook"=>"sshd", "cmd"=>["mkdir -p /var/run/sshd", "mkdir -p /root/.ssh", "echo \"$ssh_key\" >> /root/.ssh/authorized_keys", "echo \"$$ENV_SSH_PUB_KEY\" >> /root/.ssh/authorized_keys", "chmod 640 /root/.ssh/authorized_keys", "rm /etc/update-motd.d/00-header", "rm /etc/update-motd.d/10-help-text", "rm /etc/legal"]}
d6e7b9e61b5a104075c7413331d5894bcb58e00719bcbcde094d3d47c080cbb0
** 引导失败 ** 请向上滚动查找更早的错误消息,可能不止一条。
./discourse-doctor 可能有助于诊断问题。
root@toxu:/var/discourse#


奇怪,第一次出现这样的错误。

./discourse-doctor
DISCOURSE DOCTOR 2019 年 9 月 3 日 08:34:20 MSK
OS: Linux toxu 4.15.0-52-generic #56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux


找到 containers/app.yml

==================== YML 设置 ====================
awk: not an option: --field-separator=:
DISCOURSE_HOSTNAME=
awk: not an option: --field-separator=:
SMTP_ADDRESS=
awk: not an option: --field-separator=:
DEVELOPER_EMAILS=
awk: not an option: --field-separator=:
SMTP_PASSWORD=
awk: not an option: --field-separator=:
SMTP_PORT=
awk: not an option: --field-separator=:
SMTP_USER_NAME=
awk: not an option: --field-separator=:
LETSENCRYPT_ACCOUNT_EMAIL=

==================== DOCKER 信息 ====================
DOCKER 版本:Docker version 18.09.6, build 481bc77

DOCKER 进程 (docker ps -a)

CONTAINER ID        IMAGE                 COMMAND             CREATED             STATUS                    PORTS                                      NAMES
9097d20dd872        local_discourse/app   "/sbin/boot"        12 days ago         Up 4 minutes              0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   app
11db3dc89d18        hello-world           "/hello"            2 months ago        Exited (0) 2 months ago                                              eager_williamson

9097d20dd872        local_discourse/app   "/sbin/boot"        12 days ago         Up 4 minutes        0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   app

Discourse 容器 app 正在运行


==================== 插件 ====================
          - git clone https://github.com/discourse/docker_manager.git
         # - git clone https://github.com/discourse/discourse-checklist.git

警告:
您似乎安装了非官方插件。
如果您遇到问题,应禁用它们并尝试重新构建。

请参阅 https://github.com/discourse/discourse/blob/master/lib/plugin/metadata.rb 获取官方列表。

========================================
Discourse 版本:未找到
Discourse 版本 (localhost):未找到


==================== 内存信息 ====================
RAM (MB): 4039

              total        used        free      shared  buff/cache   available
Mem:           3944         436        2435           0        1072        3263
Swap:          2047           0        2047

==================== 磁盘空间检查 ====================
---------- 操作系统磁盘空间 ----------
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda2        59G   33G   24G  59% /

==================== 磁盘信息 ====================
Disk /dev/vda: 60 GiB, 64424509440 bytes, 125829120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 3BBEBDF5-E00D-4156-A5E5-BE62687875D4

Device     Start       End   Sectors Size Type
/dev/vda1   2048      4095      2048   1M BIOS boot
/dev/vda2   4096 125827071 125822976  60G Linux filesystem

==================== 磁盘信息结束 ====================

==================== 邮件测试 ====================
要进行稳健的测试,请从 http://www.mail-tester.com/ 获取一个地址
或者只是给自己发送一封测试邮件。
邮件测试的电子邮件地址?(输入 'n' 跳过)[]: n
邮件测试已跳过。
替换:SMTP_PASSWORD
替换:LETSENCRYPT_ACCOUNT_EMAIL
替换:DEVELOPER_EMAILS
替换:DISCOURSE_DB_PASSWORD
替换:发送邮件至

==================== 完成! ====================
本程序的输出可能位于 http:///NDAzZTk1NDk1NmMxYmZj.txt
在分享 URL 之前,请仔细检查该文件。

您可以使用以下命令查看此脚本的输出:
LESS=-Ri less /tmp/discourse-debug.txt

但首先,请确保您知道以下前三条命令!!!

使用上述命令(称为 'less')查看文件时需要知道的命令:
q              -- 退出
/error<ENTER>  -- 搜索单词 'error'
n              -- 搜索下一个匹配项
g              -- 跳转到文件开头
f              -- 向前翻页
b              -- 向后翻页
G              -- 跳转到文件末尾

sshd 模板可能与新的基础镜像不兼容。您能否尝试在 app.yml 的 templates 部分移除 sshd.template.yml 后重新构建?

cc @falco

谢谢。该证书在域名上已过期。
随后(在我更新证书时)出现了一个错误:

Pups::ExecError: rm /etc/update-motd.d/00-header failed with return #<Process::Status: pid 181 exit 1>

该脚本因某种原因无法删除文件 /etc/update-motd.d/00-header 以及另外几个文件。我删除了:

root@toxu:/var/discourse# grep -ril "rm /etc/update-motd.d/00-header"  ./
./templates/sshd.template.yml

root@toxu:/var/discourse# diff templates/sshd.template.yml templates/sshd.template.yml.backup
40a41,43
> - rm /etc/update-motd.d/00-header
> - rm /etc/update-motd.d/10-help-text
> - rm /etc/legal

之后问题就解决了。
此问题可以关闭。

这对我也管用——谢谢!

我怀疑很多网站都会受到此问题的影响。

嗯,看起来 sshd 模板已在 2016 年 1 月从独立示例中移除,这就是为什么我在新安装上的测试都能正常运行的原因。

不过,此提交 应该能修复该问题。感谢 @Stranik@gerhard