#!/bin/bash # 1. 重新生成 SSH 密钥对 rm -f /etc/ssh/ssh_host_* ssh-keygen -A # 2. 启动 SSH 服务 service ssh restart