跨平台 Unix 系统管理与自动化工具实践
在管理多样化的 *nix 机器基础设施时,可以结合使用 SSH 密钥、NFS 挂载的源目录和跨平台 Python 代码,以下是详细步骤。
系统管理步骤
- 创建 SSH 公钥:在用于管理机器的系统上创建 SSH 公钥。不同平台的操作可能有所不同,可参考操作系统文档或使用
man ssh获取详细信息。示例命令如下:
[ngift@Macintosh - 6][H:11026][J:0]% ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: 6c:2f:6e:f6:b7:b8:4d:17:05:99:67:26:1c:b9:74:11 root@localhost.localdomain [ngift@Macintosh - 6][H:11026][J:0]%